Currently, the read-only analysis engine supports most of MySQL's logical operations, but there are still limitations and incompatibilities in certain scenarios. This document introduces supported logical operations in the read-only analysis engine, and enumerates type restrictions on input parameters. Input parameters and usage methods not mentioned in the document are not supported.
Supported Types of Logical Operations
and Operation
Syntax: op1 and op2
Supported value types for op1: bool only.
Supported value types for op2: bool only.
or Operation
Syntax: op1 or op2
Supported value types for op1: bool only.
Supported value types for op2: bool only.
not Operation
Syntax: not op1
Supported value types for op1: bool only.
case Operation
Syntax: case when search_condition then statement_list else statement_list end
Supported value types for search_condition: bool only.
Supported value types for statement_list: int, bigint, double, decimal, varchar, and char.
if Operation
Syntax: if(expr1, expr2, expr3)
Supported value types for expr1: bool only.
Supported value types for expr2: int, bigint, double, decimal, varchar, and char.
Supported value types for expr3: int, bigint, double, decimal, varchar, and char.
ifnull Operation
Syntax: ifnull(expr1, expr2)
Supported value types for expr1: int, bigint, double, decimal, varchar, and char.
Supported value types for expr2: int, bigint, double, decimal, varchar, and char.
isnull Operation
Syntax: isnull(expr1)
Supported value types for expr1: int, bigint, double, decimal, varchar, and char.
in Operation
Syntax: expr IN (value,...)
Supported value types for expr: int, bigint, double, decimal, varchar, and char.
Supported value types for value: int, bigint, double, decimal, varchar, and char.
Note:
In the scenario of multiple values, each value can only be a constant instead of a variable or a field name. For example, columnA in (columnB, varA) can only be like column in ('1', '2', '3').
Syntax: expr IN (sub_query)
Supported value types for expr: int, bigint, double, decimal, varchar, and char.
Supported value types for sub_query: subquery and single field.
like Operation
Syntax: expr like pattern
Supported value types for expr: int, bigint, double, decimal, varchar, and char.
Supported value types for pattern: int, bigint, double, decimal, varchar, and char.
Note:
pattern only supports constants instead of variables or field names.
coalesce Operation
Syntax: coalesce(value,...)
Supported value types for value: int, bigint, double, decimal, varchar, and char.
Was this page helpful?