diff --git a/src/sql/resolver/expr/ob_raw_expr_util.cpp b/src/sql/resolver/expr/ob_raw_expr_util.cpp index 2576a2331d..d5f794ef2e 100644 --- a/src/sql/resolver/expr/ob_raw_expr_util.cpp +++ b/src/sql/resolver/expr/ob_raw_expr_util.cpp @@ -6510,20 +6510,6 @@ int ObRawExprUtils::check_need_bool_expr(const ObRawExpr *expr, bool &need_bool_ case T_OP_NOT_IN: case T_OP_EXISTS: case T_OP_NOT_EXISTS: - - // all int is 8 byte in datum, so safe for expr to use get_int() for tinyint type - case T_TINYINT: - case T_SMALLINT: - case T_MEDIUMINT: - case T_INT32: - case T_INT: - - case T_UTINYINT: - case T_USMALLINT: - case T_UMEDIUMINT: - case T_UINT32: - case T_UINT64: - case T_OP_XOR: case T_OP_BOOL: { need_bool_expr = false; diff --git a/unittest/sql/resolver/expr/test_raw_expr_canonicalizer.result b/unittest/sql/resolver/expr/test_raw_expr_canonicalizer.result index 12e00726b0..a1f3fd4162 100644 --- a/unittest/sql/resolver/expr/test_raw_expr_canonicalizer.result +++ b/unittest/sql/resolver/expr/test_raw_expr_canonicalizer.result @@ -1082,398 +1082,7 @@ not a between 1 and 100 ], "children": [ { - "item_type":"T_INT", - "result_type": { - "meta": { - "type":"BIGINT", - "collation":"binary", - "coercibility":"NUMERIC" - }, - "accuracy": { - "length":1, - "precision":1, - "scale":0 - }, - "flag":1, - "calc_type": { - "type":"NULL", - "collation":"invalid_type", - "coercibility":"INVALID" - } - }, - "expr_info": [ - "IS_CONST", - "CNT_CONST" - ], - "rel_id": [ - ], - "value": { - "BIGINT":1 - } - }, - { - "item_type":"T_INT", - "result_type": { - "meta": { - "type":"BIGINT", - "collation":"binary", - "coercibility":"NUMERIC" - }, - "accuracy": { - "length":1, - "precision":1, - "scale":0 - }, - "flag":1, - "calc_type": { - "type":"NULL", - "collation":"invalid_type", - "coercibility":"INVALID" - } - }, - "expr_info": [ - "IS_CONST", - "CNT_CONST" - ], - "rel_id": [ - ], - "value": { - "BIGINT":2 - } - }, - { - "item_type":"T_INT", - "result_type": { - "meta": { - "type":"BIGINT", - "collation":"binary", - "coercibility":"NUMERIC" - }, - "accuracy": { - "length":1, - "precision":1, - "scale":0 - }, - "flag":1, - "calc_type": { - "type":"NULL", - "collation":"invalid_type", - "coercibility":"INVALID" - } - }, - "expr_info": [ - "IS_CONST", - "CNT_CONST" - ], - "rel_id": [ - ], - "value": { - "BIGINT":3 - } - }, - { - "item_type":"T_INT", - "result_type": { - "meta": { - "type":"BIGINT", - "collation":"binary", - "coercibility":"NUMERIC" - }, - "accuracy": { - "length":1, - "precision":1, - "scale":0 - }, - "flag":1, - "calc_type": { - "type":"NULL", - "collation":"invalid_type", - "coercibility":"INVALID" - } - }, - "expr_info": [ - "IS_CONST", - "CNT_CONST" - ], - "rel_id": [ - ], - "value": { - "BIGINT":4 - } - }, - { - "item_type":"T_INT", - "result_type": { - "meta": { - "type":"BIGINT", - "collation":"binary", - "coercibility":"NUMERIC" - }, - "accuracy": { - "length":1, - "precision":1, - "scale":0 - }, - "flag":1, - "calc_type": { - "type":"NULL", - "collation":"invalid_type", - "coercibility":"INVALID" - } - }, - "expr_info": [ - "IS_CONST", - "CNT_CONST" - ], - "rel_id": [ - ], - "value": { - "BIGINT":5 - } - } - ] -} -(1 or 2) or (3 or 4 or 5) -{ - "item_type":"T_OP_OR", - "result_type": { - "meta": { - "type":"", - "collation":"binary", - "coercibility":"NUMERIC" - }, - "accuracy": { - "length":-1, - "precision":-1, - "scale":-1 - }, - "flag":0, - "calc_type": { - "type":"NULL", - "collation":"invalid_type", - "coercibility":"INVALID" - } - }, - "expr_info": [ - "IS_CONST_EXPR", - "CNT_CONST" - ], - "rel_id": [ - ], - "children": [ - { - "item_type":"T_INT", - "result_type": { - "meta": { - "type":"BIGINT", - "collation":"binary", - "coercibility":"NUMERIC" - }, - "accuracy": { - "length":1, - "precision":1, - "scale":0 - }, - "flag":1, - "calc_type": { - "type":"NULL", - "collation":"invalid_type", - "coercibility":"INVALID" - } - }, - "expr_info": [ - "IS_CONST", - "CNT_CONST" - ], - "rel_id": [ - ], - "value": { - "BIGINT":1 - } - }, - { - "item_type":"T_INT", - "result_type": { - "meta": { - "type":"BIGINT", - "collation":"binary", - "coercibility":"NUMERIC" - }, - "accuracy": { - "length":1, - "precision":1, - "scale":0 - }, - "flag":1, - "calc_type": { - "type":"NULL", - "collation":"invalid_type", - "coercibility":"INVALID" - } - }, - "expr_info": [ - "IS_CONST", - "CNT_CONST" - ], - "rel_id": [ - ], - "value": { - "BIGINT":2 - } - }, - { - "item_type":"T_INT", - "result_type": { - "meta": { - "type":"BIGINT", - "collation":"binary", - "coercibility":"NUMERIC" - }, - "accuracy": { - "length":1, - "precision":1, - "scale":0 - }, - "flag":1, - "calc_type": { - "type":"NULL", - "collation":"invalid_type", - "coercibility":"INVALID" - } - }, - "expr_info": [ - "IS_CONST", - "CNT_CONST" - ], - "rel_id": [ - ], - "value": { - "BIGINT":3 - } - }, - { - "item_type":"T_INT", - "result_type": { - "meta": { - "type":"BIGINT", - "collation":"binary", - "coercibility":"NUMERIC" - }, - "accuracy": { - "length":1, - "precision":1, - "scale":0 - }, - "flag":1, - "calc_type": { - "type":"NULL", - "collation":"invalid_type", - "coercibility":"INVALID" - } - }, - "expr_info": [ - "IS_CONST", - "CNT_CONST" - ], - "rel_id": [ - ], - "value": { - "BIGINT":4 - } - }, - { - "item_type":"T_INT", - "result_type": { - "meta": { - "type":"BIGINT", - "collation":"binary", - "coercibility":"NUMERIC" - }, - "accuracy": { - "length":1, - "precision":1, - "scale":0 - }, - "flag":1, - "calc_type": { - "type":"NULL", - "collation":"invalid_type", - "coercibility":"INVALID" - } - }, - "expr_info": [ - "IS_CONST", - "CNT_CONST" - ], - "rel_id": [ - ], - "value": { - "BIGINT":5 - } - } - ] -} -(1 and 2) or (3 and 1) -{ - "item_type":"T_OP_AND", - "result_type": { - "meta": { - "type":"TINYINT", - "collation":"binary", - "coercibility":"NUMERIC" - }, - "accuracy": { - "length":-1, - "precision":-1, - "scale":-1 - }, - "flag":0, - "calc_type": { - "type":"NULL", - "collation":"invalid_type", - "coercibility":"INVALID" - } - }, - "expr_info": [ - "IS_CONST_EXPR", - "CNT_CONST", - "CNT_OR" - ], - "rel_id": [ - ], - "children": [ - { - "item_type":"T_INT", - "result_type": { - "meta": { - "type":"BIGINT", - "collation":"binary", - "coercibility":"NUMERIC" - }, - "accuracy": { - "length":1, - "precision":1, - "scale":0 - }, - "flag":1, - "calc_type": { - "type":"NULL", - "collation":"invalid_type", - "coercibility":"INVALID" - } - }, - "expr_info": [ - "IS_CONST", - "CNT_CONST" - ], - "rel_id": [ - ], - "value": { - "BIGINT":1 - } - }, - { - "item_type":"T_OP_OR", + "item_type":"T_OP_BOOL", "result_type": { "meta": { "type":"", @@ -1493,10 +1102,69 @@ not a between 1 and 100 } }, "expr_info": [ - "IS_OR", "IS_CONST_EXPR", "CNT_CONST", - "CNT_OR" + "IS_INNER_ADDED_EXPR" + ], + "rel_id": [ + ], + "children": [ + { + "item_type":"T_INT", + "result_type": { + "meta": { + "type":"BIGINT", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":1, + "precision":1, + "scale":0 + }, + "flag":1, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST", + "CNT_CONST" + ], + "rel_id": [ + ], + "value": { + "BIGINT":1 + } + } + ] + }, + { + "item_type":"T_OP_BOOL", + "result_type": { + "meta": { + "type":"", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":-1, + "precision":-1, + "scale":-1 + }, + "flag":0, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST_EXPR", + "CNT_CONST", + "IS_INNER_ADDED_EXPR" ], "rel_id": [ ], @@ -1530,7 +1198,37 @@ not a between 1 and 100 "value": { "BIGINT":2 } + } + ] + }, + { + "item_type":"T_OP_BOOL", + "result_type": { + "meta": { + "type":"", + "collation":"binary", + "coercibility":"NUMERIC" }, + "accuracy": { + "length":-1, + "precision":-1, + "scale":-1 + }, + "flag":0, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST_EXPR", + "CNT_CONST", + "IS_INNER_ADDED_EXPR" + ], + "rel_id": [ + ], + "children": [ { "item_type":"T_INT", "result_type": { @@ -1562,6 +1260,698 @@ not a between 1 and 100 } } ] + }, + { + "item_type":"T_OP_BOOL", + "result_type": { + "meta": { + "type":"", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":-1, + "precision":-1, + "scale":-1 + }, + "flag":0, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST_EXPR", + "CNT_CONST", + "IS_INNER_ADDED_EXPR" + ], + "rel_id": [ + ], + "children": [ + { + "item_type":"T_INT", + "result_type": { + "meta": { + "type":"BIGINT", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":1, + "precision":1, + "scale":0 + }, + "flag":1, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST", + "CNT_CONST" + ], + "rel_id": [ + ], + "value": { + "BIGINT":4 + } + } + ] + }, + { + "item_type":"T_OP_BOOL", + "result_type": { + "meta": { + "type":"", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":-1, + "precision":-1, + "scale":-1 + }, + "flag":0, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST_EXPR", + "CNT_CONST", + "IS_INNER_ADDED_EXPR" + ], + "rel_id": [ + ], + "children": [ + { + "item_type":"T_INT", + "result_type": { + "meta": { + "type":"BIGINT", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":1, + "precision":1, + "scale":0 + }, + "flag":1, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST", + "CNT_CONST" + ], + "rel_id": [ + ], + "value": { + "BIGINT":5 + } + } + ] + } + ] +} +(1 or 2) or (3 or 4 or 5) +{ + "item_type":"T_OP_OR", + "result_type": { + "meta": { + "type":"", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":-1, + "precision":-1, + "scale":-1 + }, + "flag":0, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST_EXPR", + "CNT_CONST" + ], + "rel_id": [ + ], + "children": [ + { + "item_type":"T_OP_BOOL", + "result_type": { + "meta": { + "type":"", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":-1, + "precision":-1, + "scale":-1 + }, + "flag":0, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST_EXPR", + "CNT_CONST", + "IS_INNER_ADDED_EXPR" + ], + "rel_id": [ + ], + "children": [ + { + "item_type":"T_INT", + "result_type": { + "meta": { + "type":"BIGINT", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":1, + "precision":1, + "scale":0 + }, + "flag":1, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST", + "CNT_CONST" + ], + "rel_id": [ + ], + "value": { + "BIGINT":1 + } + } + ] + }, + { + "item_type":"T_OP_BOOL", + "result_type": { + "meta": { + "type":"", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":-1, + "precision":-1, + "scale":-1 + }, + "flag":0, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST_EXPR", + "CNT_CONST", + "IS_INNER_ADDED_EXPR" + ], + "rel_id": [ + ], + "children": [ + { + "item_type":"T_INT", + "result_type": { + "meta": { + "type":"BIGINT", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":1, + "precision":1, + "scale":0 + }, + "flag":1, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST", + "CNT_CONST" + ], + "rel_id": [ + ], + "value": { + "BIGINT":2 + } + } + ] + }, + { + "item_type":"T_OP_BOOL", + "result_type": { + "meta": { + "type":"", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":-1, + "precision":-1, + "scale":-1 + }, + "flag":0, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST_EXPR", + "CNT_CONST", + "IS_INNER_ADDED_EXPR" + ], + "rel_id": [ + ], + "children": [ + { + "item_type":"T_INT", + "result_type": { + "meta": { + "type":"BIGINT", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":1, + "precision":1, + "scale":0 + }, + "flag":1, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST", + "CNT_CONST" + ], + "rel_id": [ + ], + "value": { + "BIGINT":3 + } + } + ] + }, + { + "item_type":"T_OP_BOOL", + "result_type": { + "meta": { + "type":"", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":-1, + "precision":-1, + "scale":-1 + }, + "flag":0, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST_EXPR", + "CNT_CONST", + "IS_INNER_ADDED_EXPR" + ], + "rel_id": [ + ], + "children": [ + { + "item_type":"T_INT", + "result_type": { + "meta": { + "type":"BIGINT", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":1, + "precision":1, + "scale":0 + }, + "flag":1, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST", + "CNT_CONST" + ], + "rel_id": [ + ], + "value": { + "BIGINT":4 + } + } + ] + }, + { + "item_type":"T_OP_BOOL", + "result_type": { + "meta": { + "type":"", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":-1, + "precision":-1, + "scale":-1 + }, + "flag":0, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST_EXPR", + "CNT_CONST", + "IS_INNER_ADDED_EXPR" + ], + "rel_id": [ + ], + "children": [ + { + "item_type":"T_INT", + "result_type": { + "meta": { + "type":"BIGINT", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":1, + "precision":1, + "scale":0 + }, + "flag":1, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST", + "CNT_CONST" + ], + "rel_id": [ + ], + "value": { + "BIGINT":5 + } + } + ] + } + ] +} +(1 and 2) or (3 and 1) +{ + "item_type":"T_OP_AND", + "result_type": { + "meta": { + "type":"TINYINT", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":-1, + "precision":-1, + "scale":-1 + }, + "flag":0, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST_EXPR", + "CNT_CONST", + "CNT_OR" + ], + "rel_id": [ + ], + "children": [ + { + "item_type":"T_OP_BOOL", + "result_type": { + "meta": { + "type":"", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":-1, + "precision":-1, + "scale":-1 + }, + "flag":0, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST_EXPR", + "CNT_CONST", + "IS_INNER_ADDED_EXPR" + ], + "rel_id": [ + ], + "children": [ + { + "item_type":"T_INT", + "result_type": { + "meta": { + "type":"BIGINT", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":1, + "precision":1, + "scale":0 + }, + "flag":1, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST", + "CNT_CONST" + ], + "rel_id": [ + ], + "value": { + "BIGINT":1 + } + } + ] + }, + { + "item_type":"T_OP_OR", + "result_type": { + "meta": { + "type":"", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":-1, + "precision":-1, + "scale":-1 + }, + "flag":0, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_OR", + "IS_CONST_EXPR", + "CNT_CONST", + "CNT_OR" + ], + "rel_id": [ + ], + "children": [ + { + "item_type":"T_OP_BOOL", + "result_type": { + "meta": { + "type":"", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":-1, + "precision":-1, + "scale":-1 + }, + "flag":0, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST_EXPR", + "CNT_CONST", + "IS_INNER_ADDED_EXPR" + ], + "rel_id": [ + ], + "children": [ + { + "item_type":"T_INT", + "result_type": { + "meta": { + "type":"BIGINT", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":1, + "precision":1, + "scale":0 + }, + "flag":1, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST", + "CNT_CONST" + ], + "rel_id": [ + ], + "value": { + "BIGINT":2 + } + } + ] + }, + { + "item_type":"T_OP_BOOL", + "result_type": { + "meta": { + "type":"", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":-1, + "precision":-1, + "scale":-1 + }, + "flag":0, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST_EXPR", + "CNT_CONST", + "IS_INNER_ADDED_EXPR" + ], + "rel_id": [ + ], + "children": [ + { + "item_type":"T_INT", + "result_type": { + "meta": { + "type":"BIGINT", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":1, + "precision":1, + "scale":0 + }, + "flag":1, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST", + "CNT_CONST" + ], + "rel_id": [ + ], + "value": { + "BIGINT":3 + } + } + ] + } + ] } ] } diff --git a/unittest/sql/resolver/expr/test_raw_expr_resolver.result b/unittest/sql/resolver/expr/test_raw_expr_resolver.result index a9e5a1dbee..f987097121 100644 --- a/unittest/sql/resolver/expr/test_raw_expr_resolver.result +++ b/unittest/sql/resolver/expr/test_raw_expr_resolver.result @@ -639,19 +639,19 @@ ], "children": [ { - "item_type":"T_INT", + "item_type":"T_OP_BOOL", "result_type": { "meta": { - "type":"BIGINT", + "type":"", "collation":"binary", "coercibility":"NUMERIC" }, "accuracy": { - "length":1, - "precision":1, - "scale":0 + "length":-1, + "precision":-1, + "scale":-1 }, - "flag":1, + "flag":0, "calc_type": { "type":"NULL", "collation":"invalid_type", @@ -659,29 +659,59 @@ } }, "expr_info": [ - "IS_CONST", - "CNT_CONST" + "IS_CONST_EXPR", + "CNT_CONST", + "IS_INNER_ADDED_EXPR" ], "rel_id": [ ], - "value": { - "BIGINT":1 - } + "children": [ + { + "item_type":"T_INT", + "result_type": { + "meta": { + "type":"BIGINT", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":1, + "precision":1, + "scale":0 + }, + "flag":1, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST", + "CNT_CONST" + ], + "rel_id": [ + ], + "value": { + "BIGINT":1 + } + } + ] }, { - "item_type":"T_INT", + "item_type":"T_OP_BOOL", "result_type": { "meta": { - "type":"BIGINT", + "type":"", "collation":"binary", "coercibility":"NUMERIC" }, "accuracy": { - "length":1, - "precision":1, - "scale":0 + "length":-1, + "precision":-1, + "scale":-1 }, - "flag":1, + "flag":0, "calc_type": { "type":"NULL", "collation":"invalid_type", @@ -689,14 +719,44 @@ } }, "expr_info": [ - "IS_CONST", - "CNT_CONST" + "IS_CONST_EXPR", + "CNT_CONST", + "IS_INNER_ADDED_EXPR" ], "rel_id": [ ], - "value": { - "BIGINT":1 - } + "children": [ + { + "item_type":"T_INT", + "result_type": { + "meta": { + "type":"BIGINT", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":1, + "precision":1, + "scale":0 + }, + "flag":1, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST", + "CNT_CONST" + ], + "rel_id": [ + ], + "value": { + "BIGINT":1 + } + } + ] } ] } @@ -729,19 +789,19 @@ ], "children": [ { - "item_type":"T_INT", + "item_type":"T_OP_BOOL", "result_type": { "meta": { - "type":"BIGINT", + "type":"", "collation":"binary", "coercibility":"NUMERIC" }, "accuracy": { - "length":3, - "precision":3, - "scale":0 + "length":-1, + "precision":-1, + "scale":-1 }, - "flag":1, + "flag":0, "calc_type": { "type":"NULL", "collation":"invalid_type", @@ -749,29 +809,59 @@ } }, "expr_info": [ - "IS_CONST", - "CNT_CONST" + "IS_CONST_EXPR", + "CNT_CONST", + "IS_INNER_ADDED_EXPR" ], "rel_id": [ ], - "value": { - "BIGINT":100 - } + "children": [ + { + "item_type":"T_INT", + "result_type": { + "meta": { + "type":"BIGINT", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":3, + "precision":3, + "scale":0 + }, + "flag":1, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST", + "CNT_CONST" + ], + "rel_id": [ + ], + "value": { + "BIGINT":100 + } + } + ] }, { - "item_type":"T_INT", + "item_type":"T_OP_BOOL", "result_type": { "meta": { - "type":"BIGINT", + "type":"", "collation":"binary", "coercibility":"NUMERIC" }, "accuracy": { - "length":1, - "precision":1, - "scale":0 + "length":-1, + "precision":-1, + "scale":-1 }, - "flag":1, + "flag":0, "calc_type": { "type":"NULL", "collation":"invalid_type", @@ -779,14 +869,44 @@ } }, "expr_info": [ - "IS_CONST", - "CNT_CONST" + "IS_CONST_EXPR", + "CNT_CONST", + "IS_INNER_ADDED_EXPR" ], "rel_id": [ ], - "value": { - "BIGINT":0 - } + "children": [ + { + "item_type":"T_INT", + "result_type": { + "meta": { + "type":"BIGINT", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":1, + "precision":1, + "scale":0 + }, + "flag":1, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST", + "CNT_CONST" + ], + "rel_id": [ + ], + "value": { + "BIGINT":0 + } + } + ] } ] } @@ -821,37 +941,7 @@ ], "children": [ { - "item_type":"T_INT", - "result_type": { - "meta": { - "type":"BIGINT", - "collation":"binary", - "coercibility":"NUMERIC" - }, - "accuracy": { - "length":3, - "precision":3, - "scale":0 - }, - "flag":1, - "calc_type": { - "type":"NULL", - "collation":"invalid_type", - "coercibility":"INVALID" - } - }, - "expr_info": [ - "IS_CONST", - "CNT_CONST" - ], - "rel_id": [ - ], - "value": { - "BIGINT":100 - } - }, - { - "item_type":"T_OP_AND", + "item_type":"T_OP_BOOL", "result_type": { "meta": { "type":"", @@ -872,41 +962,12 @@ }, "expr_info": [ "IS_CONST_EXPR", - "CNT_CONST" + "CNT_CONST", + "IS_INNER_ADDED_EXPR" ], "rel_id": [ ], "children": [ - { - "item_type":"T_INT", - "result_type": { - "meta": { - "type":"BIGINT", - "collation":"binary", - "coercibility":"NUMERIC" - }, - "accuracy": { - "length":1, - "precision":1, - "scale":0 - }, - "flag":1, - "calc_type": { - "type":"NULL", - "collation":"invalid_type", - "coercibility":"INVALID" - } - }, - "expr_info": [ - "IS_CONST", - "CNT_CONST" - ], - "rel_id": [ - ], - "value": { - "BIGINT":0 - } - }, { "item_type":"T_INT", "result_type": { @@ -938,6 +999,155 @@ } } ] + }, + { + "item_type":"T_OP_AND", + "result_type": { + "meta": { + "type":"", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":-1, + "precision":-1, + "scale":-1 + }, + "flag":0, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST_EXPR", + "CNT_CONST" + ], + "rel_id": [ + ], + "children": [ + { + "item_type":"T_OP_BOOL", + "result_type": { + "meta": { + "type":"", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":-1, + "precision":-1, + "scale":-1 + }, + "flag":0, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST_EXPR", + "CNT_CONST", + "IS_INNER_ADDED_EXPR" + ], + "rel_id": [ + ], + "children": [ + { + "item_type":"T_INT", + "result_type": { + "meta": { + "type":"BIGINT", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":1, + "precision":1, + "scale":0 + }, + "flag":1, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST", + "CNT_CONST" + ], + "rel_id": [ + ], + "value": { + "BIGINT":0 + } + } + ] + }, + { + "item_type":"T_OP_BOOL", + "result_type": { + "meta": { + "type":"", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":-1, + "precision":-1, + "scale":-1 + }, + "flag":0, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST_EXPR", + "CNT_CONST", + "IS_INNER_ADDED_EXPR" + ], + "rel_id": [ + ], + "children": [ + { + "item_type":"T_INT", + "result_type": { + "meta": { + "type":"BIGINT", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":3, + "precision":3, + "scale":0 + }, + "flag":1, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST", + "CNT_CONST" + ], + "rel_id": [ + ], + "value": { + "BIGINT":100 + } + } + ] + } + ] } ] } @@ -2414,19 +2624,19 @@ ], "children": [ { - "item_type":"T_INT", + "item_type":"T_OP_BOOL", "result_type": { "meta": { - "type":"BIGINT", + "type":"", "collation":"binary", "coercibility":"NUMERIC" }, "accuracy": { - "length":2, - "precision":2, - "scale":0 + "length":-1, + "precision":-1, + "scale":-1 }, - "flag":1, + "flag":0, "calc_type": { "type":"NULL", "collation":"invalid_type", @@ -2434,14 +2644,44 @@ } }, "expr_info": [ - "IS_CONST", - "CNT_CONST" + "IS_CONST_EXPR", + "CNT_CONST", + "IS_INNER_ADDED_EXPR" ], "rel_id": [ ], - "value": { - "BIGINT":10 - } + "children": [ + { + "item_type":"T_INT", + "result_type": { + "meta": { + "type":"BIGINT", + "collation":"binary", + "coercibility":"NUMERIC" + }, + "accuracy": { + "length":2, + "precision":2, + "scale":0 + }, + "flag":1, + "calc_type": { + "type":"NULL", + "collation":"invalid_type", + "coercibility":"INVALID" + } + }, + "expr_info": [ + "IS_CONST", + "CNT_CONST" + ], + "rel_id": [ + ], + "value": { + "BIGINT":10 + } + } + ] } ] }