Skip to content

Casting Rules

andyfeng edited this page Apr 6, 2022 · 2 revisions

Our system defines two types of casting named explicit cast and implicit cast.

Explicit cast

Explicit casts are function calls from user input, e.g. string(), date() ...

Implicit cast

Implicit casts are added internally and are usually used to reduce codes for better maintainability. The rules for implicit casts are as follows

  • If a function is not overload (e.g. AND, CONTAINS), we cast from unstructured to corresponding structured type
  • If a function is overload (e.g. ADD), and at least one of the parameter is unstructured, we cast structured type to unstructured type.

Note: implicit casting between structured type is not supported.

Clone this wiki locally