14411 lines
		
	
	
		
			344 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			14411 lines
		
	
	
		
			344 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| ***************   Case 1   ***************
 | |
| drop database if exists db_set;
 | |
| {
 | |
|   "drop_database_arg":"tenant_id",
 | |
|   "database_name":"db_set",
 | |
|   "if_exist":true,
 | |
|   "to_recyclebin":false
 | |
| }
 | |
| ***************   Case 2   ***************
 | |
| create database db_set;
 | |
| {
 | |
|   "create_database_arg":"database_schema",
 | |
|   "database_id":-1,
 | |
|   "schema_version":1,
 | |
|   "database_name":"db_set",
 | |
|   "replica_num":0,
 | |
|   "zone_list": [
 | |
|   ],
 | |
|   "primary_zone":"",
 | |
|   "charset_type":2,
 | |
|   "collation_type":"utf8mb4_general_ci",
 | |
|   "name_case_mode":-1,
 | |
|   "comment":"",
 | |
|   "read_only":false,
 | |
|   "default_tablegroup_id":-1,
 | |
|   "default_tablegroup_name":"",
 | |
|   "in_recyclebin":false,
 | |
|   "primary_zone_array": [
 | |
|   ]
 | |
| }
 | |
| ***************   Case 3   ***************
 | |
| use db_set;
 | |
| {
 | |
|   "stmt_type":97
 | |
| }
 | |
| ***************   Case 4   ***************
 | |
| drop table if exists t1,t2;
 | |
| {
 | |
|   "stmt_type":21,
 | |
|   "drop_table_arg": {
 | |
|     "tenant_id":1,
 | |
|     "table_type":3,
 | |
|     "tables": [
 | |
|        {
 | |
|         "database_name":"db_set",
 | |
|         "table_name":"t1"
 | |
|       },
 | |
|        {
 | |
|         "database_name":"db_set",
 | |
|         "table_name":"t2"
 | |
|       }
 | |
|     ],
 | |
|     "if_exist":true,
 | |
|     "to_recyclebin":false,
 | |
|     "session_id":-1,
 | |
|     "sess_create_time":0
 | |
|   }
 | |
| }
 | |
| ***************   Case 5   ***************
 | |
| CREATE TABLE t1 (pk int primary key, a int not null, b char (10) not null);
 | |
| {"ObTableStmt":{"partition_fun_expr":[], "range_values_exprs":[], "list_values_exprs":[], "index_partition_resolve_results":[], "part_type":8}, "stmt_type":20, "create_table_arg":{"if_not_exist":false, "schema":{"simple_table_schema":{"tenant_id":1, "database_id":18446744073709551615, "tablegroup_id":1099511627777, "table_id":18446744073709551615, "table_name":"t1", "replica_num":0, "previous_locality_str":"", "min_partition_id":0, "session_id":0, "index_type":0, "table_type":3, "data_table_id":0, "name_casemode":-1, "schema_version":0, "part_level":0, "part_option":{"part_func_type":0, "part_func_expr":"", "part_num":1, "partition_cnt_within_partition_table":-1, "max_used_part_id":0}, "sub_part_option":{"part_func_type":0, "part_func_expr":"", "part_num":1, "partition_cnt_within_partition_table":-1, "max_used_part_id":-1}, "locality_str":"", "zone_list":[], "primary_zone":"", "part_num":0, "subpart_num":0, "partition_num":1, "subpartition_num":0, "partition_array":[{"BasePartition":{"tenant_id":18446744073709551615, "table_id":18446744073709551615, "part_id":0, "name":"p0", "high_bound_val":, "list_row_values":[], "part_idx":0}, "mapping_pg_part_id":-1}], "subpartition_array":null, "index_status":1, "binding":false, "duplicate_scope":0}, "max_used_column_id":18, "max_used_constraint_id":0, "sess_active_time":0, "rowkey_column_num":1, "index_column_num":0, "rowkey_split_pos":0, "block_size":16384, "is_use_bloomfilter":false, "progressive_merge_num":0, "tablet_size":134217728, "pctfree":10, "load_type":0, "index_using_type":0, "def_type":1, "charset_type":2, "collation_type":45, "create_mem_version":0, "index_status":1, "partition_status":0, "code_version":1, "last_modified_frozen_version":0, "comment":"", "pk_comment":"", "create_host":"", "zone_replica_attr_array":[], "region_replica_num_array":[], "tablegroup_name":"", "compress_func_name":"zstd_1.0", "row_store_type":1, "store_format":3, "expire_info":"", "view_schema":{"view_definition":"", "check_option":"none", "is_updatable":"false", "is_materialized":"false"}, "autoinc_column_id":0, "auto_increment":1, "read_only":false, "primary_zone_array":[], "index_tid_array":[], "mv_tid_array":[], "aux_vp_tid_array":[], "base_table_ids":[], "rowkey_info":{"columns":[{"length":0, "column_id":16, "type":{"type":"INT", "collation":"binary", "coercibility":"NUMERIC"}, "order":0, "fulltext_flag":false}], "capacity":1}, "partition_key_info":{"columns":null, "capacity":0}, "aux_vp_tid_array":[]}, "index_arg_list":[], "constraint_list":[], "db_name":"db_set", "last_replay_log_id":0, "foreign_key_arg_list":[], "vertical_partition_arg_list":[]}, "index_arg_list":[]}
 | |
| ***************   Case 6   ***************
 | |
| CREATE TABLE t2 (pk int primary key, a int not null, b char (10) not null);
 | |
| {"ObTableStmt":{"partition_fun_expr":[], "range_values_exprs":[], "list_values_exprs":[], "index_partition_resolve_results":[], "part_type":8}, "stmt_type":20, "create_table_arg":{"if_not_exist":false, "schema":{"simple_table_schema":{"tenant_id":1, "database_id":18446744073709551615, "tablegroup_id":1099511627777, "table_id":18446744073709551615, "table_name":"t2", "replica_num":0, "previous_locality_str":"", "min_partition_id":0, "session_id":0, "index_type":0, "table_type":3, "data_table_id":0, "name_casemode":-1, "schema_version":0, "part_level":0, "part_option":{"part_func_type":0, "part_func_expr":"", "part_num":1, "partition_cnt_within_partition_table":-1, "max_used_part_id":0}, "sub_part_option":{"part_func_type":0, "part_func_expr":"", "part_num":1, "partition_cnt_within_partition_table":-1, "max_used_part_id":-1}, "locality_str":"", "zone_list":[], "primary_zone":"", "part_num":0, "subpart_num":0, "partition_num":1, "subpartition_num":0, "partition_array":[{"BasePartition":{"tenant_id":18446744073709551615, "table_id":18446744073709551615, "part_id":0, "name":"p0", "high_bound_val":, "list_row_values":[], "part_idx":0}, "mapping_pg_part_id":-1}], "subpartition_array":null, "index_status":1, "binding":false, "duplicate_scope":0}, "max_used_column_id":18, "max_used_constraint_id":0, "sess_active_time":0, "rowkey_column_num":1, "index_column_num":0, "rowkey_split_pos":0, "block_size":16384, "is_use_bloomfilter":false, "progressive_merge_num":0, "tablet_size":134217728, "pctfree":10, "load_type":0, "index_using_type":0, "def_type":1, "charset_type":2, "collation_type":45, "create_mem_version":0, "index_status":1, "partition_status":0, "code_version":1, "last_modified_frozen_version":0, "comment":"", "pk_comment":"", "create_host":"", "zone_replica_attr_array":[], "region_replica_num_array":[], "tablegroup_name":"", "compress_func_name":"zstd_1.0", "row_store_type":1, "store_format":3, "expire_info":"", "view_schema":{"view_definition":"", "check_option":"none", "is_updatable":"false", "is_materialized":"false"}, "autoinc_column_id":0, "auto_increment":1, "read_only":false, "primary_zone_array":[], "index_tid_array":[], "mv_tid_array":[], "aux_vp_tid_array":[], "base_table_ids":[], "rowkey_info":{"columns":[{"length":0, "column_id":16, "type":{"type":"INT", "collation":"binary", "coercibility":"NUMERIC"}, "order":0, "fulltext_flag":false}], "capacity":1}, "partition_key_info":{"columns":null, "capacity":0}, "aux_vp_tid_array":[]}, "index_arg_list":[], "constraint_list":[], "db_name":"db_set", "last_replay_log_id":0, "foreign_key_arg_list":[], "vertical_partition_arg_list":[]}, "index_arg_list":[]}
 | |
| ***************   Case 7   ***************
 | |
| select a,b from t1 union select a,b from t2;
 | |
| {
 | |
|   "set_op":1,
 | |
|   "distinct":true,
 | |
|   "left_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|        {
 | |
|         "table_id":1099511677877,
 | |
|         "table_name":"t1",
 | |
|         "alias_name":"",
 | |
|         "synonym_name":"",
 | |
|         "table_type":0,
 | |
|         "ref_id":1099511677877,
 | |
|         "database_name":"db_set",
 | |
|         "for_update":false,
 | |
|         "wait":-1,
 | |
|         "mock_id":-1,
 | |
|         "view_base_item":-1
 | |
|       }
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|        {
 | |
|         "column_id":17,
 | |
|         "table_id":1099511677877,
 | |
|         "column":"a",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677877,
 | |
|         "base_cid":17,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "column_id":18,
 | |
|         "table_id":1099511677877,
 | |
|         "column":"b",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677877,
 | |
|         "base_cid":18,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"a",
 | |
|         "expr_name":"a",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"b",
 | |
|         "expr_name":"b",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|        {
 | |
|         "table_id":1099511677877,
 | |
|         "is_join":false
 | |
|       }
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|     ],
 | |
|     "limit":null,
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":-1,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":false,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":0,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "right_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|        {
 | |
|         "table_id":1099511677878,
 | |
|         "table_name":"t2",
 | |
|         "alias_name":"",
 | |
|         "synonym_name":"",
 | |
|         "table_type":0,
 | |
|         "ref_id":1099511677878,
 | |
|         "database_name":"db_set",
 | |
|         "for_update":false,
 | |
|         "wait":-1,
 | |
|         "mock_id":-1,
 | |
|         "view_base_item":-1
 | |
|       }
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|        {
 | |
|         "column_id":17,
 | |
|         "table_id":1099511677878,
 | |
|         "column":"a",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677878,
 | |
|         "base_cid":17,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "column_id":18,
 | |
|         "table_id":1099511677878,
 | |
|         "column":"b",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677878,
 | |
|         "base_cid":18,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"a",
 | |
|         "expr_name":"a",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"b",
 | |
|         "expr_name":"b",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|        {
 | |
|         "table_id":1099511677878,
 | |
|         "is_join":false
 | |
|       }
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|     ],
 | |
|     "limit":null,
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":-1,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":false,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":0,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "order_by": [
 | |
|   ],
 | |
|   "limit":null,
 | |
|   "select": [
 | |
|      {
 | |
|       "expression": {
 | |
|         "item_type":"T_OP_UNION",
 | |
|         "result_type": {
 | |
|           "meta": {
 | |
|             "type":"INT",
 | |
|             "collation":"binary",
 | |
|             "coercibility":"NUMERIC"
 | |
|           },
 | |
|           "accuracy": {
 | |
|             "length":-1,
 | |
|             "precision":11,
 | |
|             "scale":0
 | |
|           },
 | |
|           "flag":1,
 | |
|           "calc_type": {
 | |
|             "type":"NULL",
 | |
|             "collation":"invalid_type",
 | |
|             "coercibility":"INVALID"
 | |
|           }
 | |
|         },
 | |
|         "expr_info": [
 | |
|           "IS_SET_OP",
 | |
|           "CNT_SET_OP"
 | |
|         ],
 | |
|         "rel_id": [
 | |
|         ],
 | |
|         "expr_level":0,
 | |
|         "expr_levels": [
 | |
|           0
 | |
|         ],
 | |
|         "children": [
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"INT",
 | |
|                 "collation":"binary",
 | |
|                 "coercibility":"NUMERIC"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":-1,
 | |
|                 "precision":11,
 | |
|                 "scale":0
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677877,
 | |
|             "column_id":17,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t1",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"a",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           },
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"INT",
 | |
|                 "collation":"binary",
 | |
|                 "coercibility":"NUMERIC"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":-1,
 | |
|                 "precision":11,
 | |
|                 "scale":0
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677878,
 | |
|             "column_id":17,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t2",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"a",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "is_alias":true,
 | |
|       "alias_name":"a",
 | |
|       "expr_name":"a",
 | |
|       "default": {
 | |
|         "NULL":"NULL"
 | |
|       }
 | |
|     },
 | |
|      {
 | |
|       "expression": {
 | |
|         "item_type":"T_OP_UNION",
 | |
|         "result_type": {
 | |
|           "meta": {
 | |
|             "type":"CHAR",
 | |
|             "collation":"utf8mb4_general_ci",
 | |
|             "coercibility":"IMPLICIT"
 | |
|           },
 | |
|           "accuracy": {
 | |
|             "length":10,
 | |
|             "precision":-1,
 | |
|             "scale":-1
 | |
|           },
 | |
|           "flag":1,
 | |
|           "calc_type": {
 | |
|             "type":"NULL",
 | |
|             "collation":"invalid_type",
 | |
|             "coercibility":"INVALID"
 | |
|           }
 | |
|         },
 | |
|         "expr_info": [
 | |
|           "IS_SET_OP",
 | |
|           "CNT_SET_OP"
 | |
|         ],
 | |
|         "rel_id": [
 | |
|         ],
 | |
|         "expr_level":0,
 | |
|         "expr_levels": [
 | |
|           0
 | |
|         ],
 | |
|         "children": [
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"CHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":10,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677877,
 | |
|             "column_id":18,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t1",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"b",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           },
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"CHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":10,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677878,
 | |
|             "column_id":18,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t2",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"b",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "is_alias":true,
 | |
|       "alias_name":"b",
 | |
|       "expr_name":"b",
 | |
|       "default": {
 | |
|         "NULL":"NULL"
 | |
|       }
 | |
|     }
 | |
|   ]
 | |
| }
 | |
| ***************   Case 8   ***************
 | |
| select a,b from t1 union distinct select a,b from t2;
 | |
| {
 | |
|   "set_op":1,
 | |
|   "distinct":true,
 | |
|   "left_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|        {
 | |
|         "table_id":1099511677877,
 | |
|         "table_name":"t1",
 | |
|         "alias_name":"",
 | |
|         "synonym_name":"",
 | |
|         "table_type":0,
 | |
|         "ref_id":1099511677877,
 | |
|         "database_name":"db_set",
 | |
|         "for_update":false,
 | |
|         "wait":-1,
 | |
|         "mock_id":-1,
 | |
|         "view_base_item":-1
 | |
|       }
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|        {
 | |
|         "column_id":17,
 | |
|         "table_id":1099511677877,
 | |
|         "column":"a",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677877,
 | |
|         "base_cid":17,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "column_id":18,
 | |
|         "table_id":1099511677877,
 | |
|         "column":"b",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677877,
 | |
|         "base_cid":18,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"a",
 | |
|         "expr_name":"a",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"b",
 | |
|         "expr_name":"b",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|        {
 | |
|         "table_id":1099511677877,
 | |
|         "is_join":false
 | |
|       }
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|     ],
 | |
|     "limit":null,
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":-1,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":false,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":0,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "right_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|        {
 | |
|         "table_id":1099511677878,
 | |
|         "table_name":"t2",
 | |
|         "alias_name":"",
 | |
|         "synonym_name":"",
 | |
|         "table_type":0,
 | |
|         "ref_id":1099511677878,
 | |
|         "database_name":"db_set",
 | |
|         "for_update":false,
 | |
|         "wait":-1,
 | |
|         "mock_id":-1,
 | |
|         "view_base_item":-1
 | |
|       }
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|        {
 | |
|         "column_id":17,
 | |
|         "table_id":1099511677878,
 | |
|         "column":"a",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677878,
 | |
|         "base_cid":17,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "column_id":18,
 | |
|         "table_id":1099511677878,
 | |
|         "column":"b",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677878,
 | |
|         "base_cid":18,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"a",
 | |
|         "expr_name":"a",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"b",
 | |
|         "expr_name":"b",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|        {
 | |
|         "table_id":1099511677878,
 | |
|         "is_join":false
 | |
|       }
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|     ],
 | |
|     "limit":null,
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":-1,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":false,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":0,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "order_by": [
 | |
|   ],
 | |
|   "limit":null,
 | |
|   "select": [
 | |
|      {
 | |
|       "expression": {
 | |
|         "item_type":"T_OP_UNION",
 | |
|         "result_type": {
 | |
|           "meta": {
 | |
|             "type":"INT",
 | |
|             "collation":"binary",
 | |
|             "coercibility":"NUMERIC"
 | |
|           },
 | |
|           "accuracy": {
 | |
|             "length":-1,
 | |
|             "precision":11,
 | |
|             "scale":0
 | |
|           },
 | |
|           "flag":1,
 | |
|           "calc_type": {
 | |
|             "type":"NULL",
 | |
|             "collation":"invalid_type",
 | |
|             "coercibility":"INVALID"
 | |
|           }
 | |
|         },
 | |
|         "expr_info": [
 | |
|           "IS_SET_OP",
 | |
|           "CNT_SET_OP"
 | |
|         ],
 | |
|         "rel_id": [
 | |
|         ],
 | |
|         "expr_level":0,
 | |
|         "expr_levels": [
 | |
|           0
 | |
|         ],
 | |
|         "children": [
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"INT",
 | |
|                 "collation":"binary",
 | |
|                 "coercibility":"NUMERIC"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":-1,
 | |
|                 "precision":11,
 | |
|                 "scale":0
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677877,
 | |
|             "column_id":17,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t1",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"a",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           },
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"INT",
 | |
|                 "collation":"binary",
 | |
|                 "coercibility":"NUMERIC"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":-1,
 | |
|                 "precision":11,
 | |
|                 "scale":0
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677878,
 | |
|             "column_id":17,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t2",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"a",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "is_alias":true,
 | |
|       "alias_name":"a",
 | |
|       "expr_name":"a",
 | |
|       "default": {
 | |
|         "NULL":"NULL"
 | |
|       }
 | |
|     },
 | |
|      {
 | |
|       "expression": {
 | |
|         "item_type":"T_OP_UNION",
 | |
|         "result_type": {
 | |
|           "meta": {
 | |
|             "type":"CHAR",
 | |
|             "collation":"utf8mb4_general_ci",
 | |
|             "coercibility":"IMPLICIT"
 | |
|           },
 | |
|           "accuracy": {
 | |
|             "length":10,
 | |
|             "precision":-1,
 | |
|             "scale":-1
 | |
|           },
 | |
|           "flag":1,
 | |
|           "calc_type": {
 | |
|             "type":"NULL",
 | |
|             "collation":"invalid_type",
 | |
|             "coercibility":"INVALID"
 | |
|           }
 | |
|         },
 | |
|         "expr_info": [
 | |
|           "IS_SET_OP",
 | |
|           "CNT_SET_OP"
 | |
|         ],
 | |
|         "rel_id": [
 | |
|         ],
 | |
|         "expr_level":0,
 | |
|         "expr_levels": [
 | |
|           0
 | |
|         ],
 | |
|         "children": [
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"CHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":10,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677877,
 | |
|             "column_id":18,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t1",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"b",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           },
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"CHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":10,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677878,
 | |
|             "column_id":18,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t2",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"b",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "is_alias":true,
 | |
|       "alias_name":"b",
 | |
|       "expr_name":"b",
 | |
|       "default": {
 | |
|         "NULL":"NULL"
 | |
|       }
 | |
|     }
 | |
|   ]
 | |
| }
 | |
| ***************   Case 9   ***************
 | |
| select a,b from t1 union all select a,b from t2;
 | |
| {
 | |
|   "set_op":1,
 | |
|   "distinct":false,
 | |
|   "left_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|        {
 | |
|         "table_id":1099511677877,
 | |
|         "table_name":"t1",
 | |
|         "alias_name":"",
 | |
|         "synonym_name":"",
 | |
|         "table_type":0,
 | |
|         "ref_id":1099511677877,
 | |
|         "database_name":"db_set",
 | |
|         "for_update":false,
 | |
|         "wait":-1,
 | |
|         "mock_id":-1,
 | |
|         "view_base_item":-1
 | |
|       }
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|        {
 | |
|         "column_id":17,
 | |
|         "table_id":1099511677877,
 | |
|         "column":"a",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677877,
 | |
|         "base_cid":17,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "column_id":18,
 | |
|         "table_id":1099511677877,
 | |
|         "column":"b",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677877,
 | |
|         "base_cid":18,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"a",
 | |
|         "expr_name":"a",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"b",
 | |
|         "expr_name":"b",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|        {
 | |
|         "table_id":1099511677877,
 | |
|         "is_join":false
 | |
|       }
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|     ],
 | |
|     "limit":null,
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":-1,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":false,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":0,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "right_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|        {
 | |
|         "table_id":1099511677878,
 | |
|         "table_name":"t2",
 | |
|         "alias_name":"",
 | |
|         "synonym_name":"",
 | |
|         "table_type":0,
 | |
|         "ref_id":1099511677878,
 | |
|         "database_name":"db_set",
 | |
|         "for_update":false,
 | |
|         "wait":-1,
 | |
|         "mock_id":-1,
 | |
|         "view_base_item":-1
 | |
|       }
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|        {
 | |
|         "column_id":17,
 | |
|         "table_id":1099511677878,
 | |
|         "column":"a",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677878,
 | |
|         "base_cid":17,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "column_id":18,
 | |
|         "table_id":1099511677878,
 | |
|         "column":"b",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677878,
 | |
|         "base_cid":18,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"a",
 | |
|         "expr_name":"a",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"b",
 | |
|         "expr_name":"b",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|        {
 | |
|         "table_id":1099511677878,
 | |
|         "is_join":false
 | |
|       }
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|     ],
 | |
|     "limit":null,
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":-1,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":false,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":0,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "order_by": [
 | |
|   ],
 | |
|   "limit":null,
 | |
|   "select": [
 | |
|      {
 | |
|       "expression": {
 | |
|         "item_type":"T_OP_UNION",
 | |
|         "result_type": {
 | |
|           "meta": {
 | |
|             "type":"INT",
 | |
|             "collation":"binary",
 | |
|             "coercibility":"NUMERIC"
 | |
|           },
 | |
|           "accuracy": {
 | |
|             "length":-1,
 | |
|             "precision":11,
 | |
|             "scale":0
 | |
|           },
 | |
|           "flag":1,
 | |
|           "calc_type": {
 | |
|             "type":"NULL",
 | |
|             "collation":"invalid_type",
 | |
|             "coercibility":"INVALID"
 | |
|           }
 | |
|         },
 | |
|         "expr_info": [
 | |
|           "IS_SET_OP",
 | |
|           "CNT_SET_OP"
 | |
|         ],
 | |
|         "rel_id": [
 | |
|         ],
 | |
|         "expr_level":0,
 | |
|         "expr_levels": [
 | |
|           0
 | |
|         ],
 | |
|         "children": [
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"INT",
 | |
|                 "collation":"binary",
 | |
|                 "coercibility":"NUMERIC"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":-1,
 | |
|                 "precision":11,
 | |
|                 "scale":0
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677877,
 | |
|             "column_id":17,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t1",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"a",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           },
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"INT",
 | |
|                 "collation":"binary",
 | |
|                 "coercibility":"NUMERIC"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":-1,
 | |
|                 "precision":11,
 | |
|                 "scale":0
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677878,
 | |
|             "column_id":17,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t2",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"a",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "is_alias":true,
 | |
|       "alias_name":"a",
 | |
|       "expr_name":"a",
 | |
|       "default": {
 | |
|         "NULL":"NULL"
 | |
|       }
 | |
|     },
 | |
|      {
 | |
|       "expression": {
 | |
|         "item_type":"T_OP_UNION",
 | |
|         "result_type": {
 | |
|           "meta": {
 | |
|             "type":"CHAR",
 | |
|             "collation":"utf8mb4_general_ci",
 | |
|             "coercibility":"IMPLICIT"
 | |
|           },
 | |
|           "accuracy": {
 | |
|             "length":10,
 | |
|             "precision":-1,
 | |
|             "scale":-1
 | |
|           },
 | |
|           "flag":1,
 | |
|           "calc_type": {
 | |
|             "type":"NULL",
 | |
|             "collation":"invalid_type",
 | |
|             "coercibility":"INVALID"
 | |
|           }
 | |
|         },
 | |
|         "expr_info": [
 | |
|           "IS_SET_OP",
 | |
|           "CNT_SET_OP"
 | |
|         ],
 | |
|         "rel_id": [
 | |
|         ],
 | |
|         "expr_level":0,
 | |
|         "expr_levels": [
 | |
|           0
 | |
|         ],
 | |
|         "children": [
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"CHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":10,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677877,
 | |
|             "column_id":18,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t1",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"b",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           },
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"CHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":10,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677878,
 | |
|             "column_id":18,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t2",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"b",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "is_alias":true,
 | |
|       "alias_name":"b",
 | |
|       "expr_name":"b",
 | |
|       "default": {
 | |
|         "NULL":"NULL"
 | |
|       }
 | |
|     }
 | |
|   ]
 | |
| }
 | |
| ***************   Case 10   ***************
 | |
| select a,b from t1 union all select a,b from t2 order by b;
 | |
| {
 | |
|   "set_op":1,
 | |
|   "distinct":false,
 | |
|   "left_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|        {
 | |
|         "table_id":1099511677877,
 | |
|         "table_name":"t1",
 | |
|         "alias_name":"",
 | |
|         "synonym_name":"",
 | |
|         "table_type":0,
 | |
|         "ref_id":1099511677877,
 | |
|         "database_name":"db_set",
 | |
|         "for_update":false,
 | |
|         "wait":-1,
 | |
|         "mock_id":-1,
 | |
|         "view_base_item":-1
 | |
|       }
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|        {
 | |
|         "column_id":17,
 | |
|         "table_id":1099511677877,
 | |
|         "column":"a",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677877,
 | |
|         "base_cid":17,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "column_id":18,
 | |
|         "table_id":1099511677877,
 | |
|         "column":"b",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677877,
 | |
|         "base_cid":18,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":2,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"a",
 | |
|         "expr_name":"a",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":2,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"b",
 | |
|         "expr_name":"b",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|        {
 | |
|         "table_id":1099511677877,
 | |
|         "is_join":false
 | |
|       }
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|     ],
 | |
|     "limit":null,
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":-1,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":false,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":0,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "right_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|        {
 | |
|         "table_id":1099511677878,
 | |
|         "table_name":"t2",
 | |
|         "alias_name":"",
 | |
|         "synonym_name":"",
 | |
|         "table_type":0,
 | |
|         "ref_id":1099511677878,
 | |
|         "database_name":"db_set",
 | |
|         "for_update":false,
 | |
|         "wait":-1,
 | |
|         "mock_id":-1,
 | |
|         "view_base_item":-1
 | |
|       }
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|        {
 | |
|         "column_id":17,
 | |
|         "table_id":1099511677878,
 | |
|         "column":"a",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677878,
 | |
|         "base_cid":17,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "column_id":18,
 | |
|         "table_id":1099511677878,
 | |
|         "column":"b",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677878,
 | |
|         "base_cid":18,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":2,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"a",
 | |
|         "expr_name":"a",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":2,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"b",
 | |
|         "expr_name":"b",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|        {
 | |
|         "table_id":1099511677878,
 | |
|         "is_join":false
 | |
|       }
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|     ],
 | |
|     "limit":null,
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":-1,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":false,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":0,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "order_by": [
 | |
|      {
 | |
|       "expression": {
 | |
|         "item_type":"T_OP_UNION",
 | |
|         "result_type": {
 | |
|           "meta": {
 | |
|             "type":"CHAR",
 | |
|             "collation":"utf8mb4_general_ci",
 | |
|             "coercibility":"IMPLICIT"
 | |
|           },
 | |
|           "accuracy": {
 | |
|             "length":10,
 | |
|             "precision":-1,
 | |
|             "scale":-1
 | |
|           },
 | |
|           "flag":1,
 | |
|           "calc_type": {
 | |
|             "type":"NULL",
 | |
|             "collation":"invalid_type",
 | |
|             "coercibility":"INVALID"
 | |
|           }
 | |
|         },
 | |
|         "expr_info": [
 | |
|           "IS_SET_OP",
 | |
|           "CNT_SET_OP"
 | |
|         ],
 | |
|         "rel_id": [
 | |
|         ],
 | |
|         "expr_level":0,
 | |
|         "expr_levels": [
 | |
|           0
 | |
|         ],
 | |
|         "children": [
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"CHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":10,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677877,
 | |
|             "column_id":18,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t1",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"b",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":2,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           },
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"CHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":10,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677878,
 | |
|             "column_id":18,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t2",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"b",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":2,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "ascending":"ASC"
 | |
|     }
 | |
|   ],
 | |
|   "limit":null,
 | |
|   "select": [
 | |
|      {
 | |
|       "expression": {
 | |
|         "item_type":"T_OP_UNION",
 | |
|         "result_type": {
 | |
|           "meta": {
 | |
|             "type":"INT",
 | |
|             "collation":"binary",
 | |
|             "coercibility":"NUMERIC"
 | |
|           },
 | |
|           "accuracy": {
 | |
|             "length":-1,
 | |
|             "precision":11,
 | |
|             "scale":0
 | |
|           },
 | |
|           "flag":1,
 | |
|           "calc_type": {
 | |
|             "type":"NULL",
 | |
|             "collation":"invalid_type",
 | |
|             "coercibility":"INVALID"
 | |
|           }
 | |
|         },
 | |
|         "expr_info": [
 | |
|           "IS_SET_OP",
 | |
|           "CNT_SET_OP"
 | |
|         ],
 | |
|         "rel_id": [
 | |
|         ],
 | |
|         "expr_level":0,
 | |
|         "expr_levels": [
 | |
|           0
 | |
|         ],
 | |
|         "children": [
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"INT",
 | |
|                 "collation":"binary",
 | |
|                 "coercibility":"NUMERIC"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":-1,
 | |
|                 "precision":11,
 | |
|                 "scale":0
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677877,
 | |
|             "column_id":17,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t1",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"a",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           },
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"INT",
 | |
|                 "collation":"binary",
 | |
|                 "coercibility":"NUMERIC"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":-1,
 | |
|                 "precision":11,
 | |
|                 "scale":0
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677878,
 | |
|             "column_id":17,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t2",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"a",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "is_alias":true,
 | |
|       "alias_name":"a",
 | |
|       "expr_name":"a",
 | |
|       "default": {
 | |
|         "NULL":"NULL"
 | |
|       }
 | |
|     },
 | |
|      {
 | |
|       "expression": {
 | |
|         "item_type":"T_OP_UNION",
 | |
|         "result_type": {
 | |
|           "meta": {
 | |
|             "type":"CHAR",
 | |
|             "collation":"utf8mb4_general_ci",
 | |
|             "coercibility":"IMPLICIT"
 | |
|           },
 | |
|           "accuracy": {
 | |
|             "length":10,
 | |
|             "precision":-1,
 | |
|             "scale":-1
 | |
|           },
 | |
|           "flag":1,
 | |
|           "calc_type": {
 | |
|             "type":"NULL",
 | |
|             "collation":"invalid_type",
 | |
|             "coercibility":"INVALID"
 | |
|           }
 | |
|         },
 | |
|         "expr_info": [
 | |
|           "IS_SET_OP",
 | |
|           "CNT_SET_OP"
 | |
|         ],
 | |
|         "rel_id": [
 | |
|         ],
 | |
|         "expr_level":0,
 | |
|         "expr_levels": [
 | |
|           0
 | |
|         ],
 | |
|         "children": [
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"CHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":10,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677877,
 | |
|             "column_id":18,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t1",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"b",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":2,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           },
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"CHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":10,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677878,
 | |
|             "column_id":18,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t2",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"b",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":2,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "is_alias":true,
 | |
|       "alias_name":"b",
 | |
|       "expr_name":"b",
 | |
|       "default": {
 | |
|         "NULL":"NULL"
 | |
|       }
 | |
|     }
 | |
|   ]
 | |
| }
 | |
| ***************   Case 11   ***************
 | |
| select a,b from t1 limit 1 union select a,b from t2;
 | |
| {
 | |
|   "set_op":1,
 | |
|   "distinct":true,
 | |
|   "left_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|        {
 | |
|         "table_id":1099511677877,
 | |
|         "table_name":"t1",
 | |
|         "alias_name":"",
 | |
|         "synonym_name":"",
 | |
|         "table_type":0,
 | |
|         "ref_id":1099511677877,
 | |
|         "database_name":"db_set",
 | |
|         "for_update":false,
 | |
|         "wait":-1,
 | |
|         "mock_id":-1,
 | |
|         "view_base_item":-1
 | |
|       }
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|        {
 | |
|         "column_id":17,
 | |
|         "table_id":1099511677877,
 | |
|         "column":"a",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677877,
 | |
|         "base_cid":17,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "column_id":18,
 | |
|         "table_id":1099511677877,
 | |
|         "column":"b",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677877,
 | |
|         "base_cid":18,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"a",
 | |
|         "expr_name":"a",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"b",
 | |
|         "expr_name":"b",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|        {
 | |
|         "table_id":1099511677877,
 | |
|         "is_join":false
 | |
|       }
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|     ],
 | |
|     "limit": {
 | |
|       "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
 | |
|       }
 | |
|     },
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":-1,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":false,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":0,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "right_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|        {
 | |
|         "table_id":1099511677878,
 | |
|         "table_name":"t2",
 | |
|         "alias_name":"",
 | |
|         "synonym_name":"",
 | |
|         "table_type":0,
 | |
|         "ref_id":1099511677878,
 | |
|         "database_name":"db_set",
 | |
|         "for_update":false,
 | |
|         "wait":-1,
 | |
|         "mock_id":-1,
 | |
|         "view_base_item":-1
 | |
|       }
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|        {
 | |
|         "column_id":17,
 | |
|         "table_id":1099511677878,
 | |
|         "column":"a",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677878,
 | |
|         "base_cid":17,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "column_id":18,
 | |
|         "table_id":1099511677878,
 | |
|         "column":"b",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677878,
 | |
|         "base_cid":18,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"a",
 | |
|         "expr_name":"a",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"b",
 | |
|         "expr_name":"b",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|        {
 | |
|         "table_id":1099511677878,
 | |
|         "is_join":false
 | |
|       }
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|     ],
 | |
|     "limit":null,
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":-1,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":false,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":0,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "order_by": [
 | |
|   ],
 | |
|   "limit":null,
 | |
|   "select": [
 | |
|      {
 | |
|       "expression": {
 | |
|         "item_type":"T_OP_UNION",
 | |
|         "result_type": {
 | |
|           "meta": {
 | |
|             "type":"INT",
 | |
|             "collation":"binary",
 | |
|             "coercibility":"NUMERIC"
 | |
|           },
 | |
|           "accuracy": {
 | |
|             "length":-1,
 | |
|             "precision":11,
 | |
|             "scale":0
 | |
|           },
 | |
|           "flag":1,
 | |
|           "calc_type": {
 | |
|             "type":"NULL",
 | |
|             "collation":"invalid_type",
 | |
|             "coercibility":"INVALID"
 | |
|           }
 | |
|         },
 | |
|         "expr_info": [
 | |
|           "IS_SET_OP",
 | |
|           "CNT_SET_OP"
 | |
|         ],
 | |
|         "rel_id": [
 | |
|         ],
 | |
|         "expr_level":0,
 | |
|         "expr_levels": [
 | |
|           0
 | |
|         ],
 | |
|         "children": [
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"INT",
 | |
|                 "collation":"binary",
 | |
|                 "coercibility":"NUMERIC"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":-1,
 | |
|                 "precision":11,
 | |
|                 "scale":0
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677877,
 | |
|             "column_id":17,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t1",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"a",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           },
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"INT",
 | |
|                 "collation":"binary",
 | |
|                 "coercibility":"NUMERIC"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":-1,
 | |
|                 "precision":11,
 | |
|                 "scale":0
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677878,
 | |
|             "column_id":17,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t2",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"a",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "is_alias":true,
 | |
|       "alias_name":"a",
 | |
|       "expr_name":"a",
 | |
|       "default": {
 | |
|         "NULL":"NULL"
 | |
|       }
 | |
|     },
 | |
|      {
 | |
|       "expression": {
 | |
|         "item_type":"T_OP_UNION",
 | |
|         "result_type": {
 | |
|           "meta": {
 | |
|             "type":"CHAR",
 | |
|             "collation":"utf8mb4_general_ci",
 | |
|             "coercibility":"IMPLICIT"
 | |
|           },
 | |
|           "accuracy": {
 | |
|             "length":10,
 | |
|             "precision":-1,
 | |
|             "scale":-1
 | |
|           },
 | |
|           "flag":1,
 | |
|           "calc_type": {
 | |
|             "type":"NULL",
 | |
|             "collation":"invalid_type",
 | |
|             "coercibility":"INVALID"
 | |
|           }
 | |
|         },
 | |
|         "expr_info": [
 | |
|           "IS_SET_OP",
 | |
|           "CNT_SET_OP"
 | |
|         ],
 | |
|         "rel_id": [
 | |
|         ],
 | |
|         "expr_level":0,
 | |
|         "expr_levels": [
 | |
|           0
 | |
|         ],
 | |
|         "children": [
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"CHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":10,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677877,
 | |
|             "column_id":18,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t1",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"b",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           },
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"CHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":10,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677878,
 | |
|             "column_id":18,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t2",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"b",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "is_alias":true,
 | |
|       "alias_name":"b",
 | |
|       "expr_name":"b",
 | |
|       "default": {
 | |
|         "NULL":"NULL"
 | |
|       }
 | |
|     }
 | |
|   ]
 | |
| }
 | |
| ***************   Case 12   ***************
 | |
| select a,b from t1 union select a,b from t2 limit 1;
 | |
| {
 | |
|   "set_op":1,
 | |
|   "distinct":true,
 | |
|   "left_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|        {
 | |
|         "table_id":1099511677877,
 | |
|         "table_name":"t1",
 | |
|         "alias_name":"",
 | |
|         "synonym_name":"",
 | |
|         "table_type":0,
 | |
|         "ref_id":1099511677877,
 | |
|         "database_name":"db_set",
 | |
|         "for_update":false,
 | |
|         "wait":-1,
 | |
|         "mock_id":-1,
 | |
|         "view_base_item":-1
 | |
|       }
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|        {
 | |
|         "column_id":17,
 | |
|         "table_id":1099511677877,
 | |
|         "column":"a",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677877,
 | |
|         "base_cid":17,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "column_id":18,
 | |
|         "table_id":1099511677877,
 | |
|         "column":"b",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677877,
 | |
|         "base_cid":18,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"a",
 | |
|         "expr_name":"a",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"b",
 | |
|         "expr_name":"b",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|        {
 | |
|         "table_id":1099511677877,
 | |
|         "is_join":false
 | |
|       }
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|     ],
 | |
|     "limit":null,
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":-1,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":false,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":0,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "right_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|        {
 | |
|         "table_id":1099511677878,
 | |
|         "table_name":"t2",
 | |
|         "alias_name":"",
 | |
|         "synonym_name":"",
 | |
|         "table_type":0,
 | |
|         "ref_id":1099511677878,
 | |
|         "database_name":"db_set",
 | |
|         "for_update":false,
 | |
|         "wait":-1,
 | |
|         "mock_id":-1,
 | |
|         "view_base_item":-1
 | |
|       }
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|        {
 | |
|         "column_id":17,
 | |
|         "table_id":1099511677878,
 | |
|         "column":"a",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677878,
 | |
|         "base_cid":17,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "column_id":18,
 | |
|         "table_id":1099511677878,
 | |
|         "column":"b",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677878,
 | |
|         "base_cid":18,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"a",
 | |
|         "expr_name":"a",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"b",
 | |
|         "expr_name":"b",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|        {
 | |
|         "table_id":1099511677878,
 | |
|         "is_join":false
 | |
|       }
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|     ],
 | |
|     "limit":null,
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":-1,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":false,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":0,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "order_by": [
 | |
|   ],
 | |
|   "limit": {
 | |
|     "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
 | |
|     }
 | |
|   },
 | |
|   "select": [
 | |
|      {
 | |
|       "expression": {
 | |
|         "item_type":"T_OP_UNION",
 | |
|         "result_type": {
 | |
|           "meta": {
 | |
|             "type":"INT",
 | |
|             "collation":"binary",
 | |
|             "coercibility":"NUMERIC"
 | |
|           },
 | |
|           "accuracy": {
 | |
|             "length":-1,
 | |
|             "precision":11,
 | |
|             "scale":0
 | |
|           },
 | |
|           "flag":1,
 | |
|           "calc_type": {
 | |
|             "type":"NULL",
 | |
|             "collation":"invalid_type",
 | |
|             "coercibility":"INVALID"
 | |
|           }
 | |
|         },
 | |
|         "expr_info": [
 | |
|           "IS_SET_OP",
 | |
|           "CNT_SET_OP"
 | |
|         ],
 | |
|         "rel_id": [
 | |
|         ],
 | |
|         "expr_level":0,
 | |
|         "expr_levels": [
 | |
|           0
 | |
|         ],
 | |
|         "children": [
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"INT",
 | |
|                 "collation":"binary",
 | |
|                 "coercibility":"NUMERIC"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":-1,
 | |
|                 "precision":11,
 | |
|                 "scale":0
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677877,
 | |
|             "column_id":17,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t1",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"a",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           },
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"INT",
 | |
|                 "collation":"binary",
 | |
|                 "coercibility":"NUMERIC"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":-1,
 | |
|                 "precision":11,
 | |
|                 "scale":0
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677878,
 | |
|             "column_id":17,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t2",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"a",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "is_alias":true,
 | |
|       "alias_name":"a",
 | |
|       "expr_name":"a",
 | |
|       "default": {
 | |
|         "NULL":"NULL"
 | |
|       }
 | |
|     },
 | |
|      {
 | |
|       "expression": {
 | |
|         "item_type":"T_OP_UNION",
 | |
|         "result_type": {
 | |
|           "meta": {
 | |
|             "type":"CHAR",
 | |
|             "collation":"utf8mb4_general_ci",
 | |
|             "coercibility":"IMPLICIT"
 | |
|           },
 | |
|           "accuracy": {
 | |
|             "length":10,
 | |
|             "precision":-1,
 | |
|             "scale":-1
 | |
|           },
 | |
|           "flag":1,
 | |
|           "calc_type": {
 | |
|             "type":"NULL",
 | |
|             "collation":"invalid_type",
 | |
|             "coercibility":"INVALID"
 | |
|           }
 | |
|         },
 | |
|         "expr_info": [
 | |
|           "IS_SET_OP",
 | |
|           "CNT_SET_OP"
 | |
|         ],
 | |
|         "rel_id": [
 | |
|         ],
 | |
|         "expr_level":0,
 | |
|         "expr_levels": [
 | |
|           0
 | |
|         ],
 | |
|         "children": [
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"CHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":10,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677877,
 | |
|             "column_id":18,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t1",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"b",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           },
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"CHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":10,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677878,
 | |
|             "column_id":18,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t2",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"b",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "is_alias":true,
 | |
|       "alias_name":"b",
 | |
|       "expr_name":"b",
 | |
|       "default": {
 | |
|         "NULL":"NULL"
 | |
|       }
 | |
|     }
 | |
|   ]
 | |
| }
 | |
| ***************   Case 13   ***************
 | |
| select a,b from t1 limit 1 union select a,b from t2 limit 1;
 | |
| {
 | |
|   "set_op":1,
 | |
|   "distinct":true,
 | |
|   "left_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|        {
 | |
|         "table_id":1099511677877,
 | |
|         "table_name":"t1",
 | |
|         "alias_name":"",
 | |
|         "synonym_name":"",
 | |
|         "table_type":0,
 | |
|         "ref_id":1099511677877,
 | |
|         "database_name":"db_set",
 | |
|         "for_update":false,
 | |
|         "wait":-1,
 | |
|         "mock_id":-1,
 | |
|         "view_base_item":-1
 | |
|       }
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|        {
 | |
|         "column_id":17,
 | |
|         "table_id":1099511677877,
 | |
|         "column":"a",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677877,
 | |
|         "base_cid":17,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "column_id":18,
 | |
|         "table_id":1099511677877,
 | |
|         "column":"b",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677877,
 | |
|         "base_cid":18,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"a",
 | |
|         "expr_name":"a",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"b",
 | |
|         "expr_name":"b",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|        {
 | |
|         "table_id":1099511677877,
 | |
|         "is_join":false
 | |
|       }
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|     ],
 | |
|     "limit": {
 | |
|       "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
 | |
|       }
 | |
|     },
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":-1,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":false,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":0,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "right_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|        {
 | |
|         "table_id":1099511677878,
 | |
|         "table_name":"t2",
 | |
|         "alias_name":"",
 | |
|         "synonym_name":"",
 | |
|         "table_type":0,
 | |
|         "ref_id":1099511677878,
 | |
|         "database_name":"db_set",
 | |
|         "for_update":false,
 | |
|         "wait":-1,
 | |
|         "mock_id":-1,
 | |
|         "view_base_item":-1
 | |
|       }
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|        {
 | |
|         "column_id":17,
 | |
|         "table_id":1099511677878,
 | |
|         "column":"a",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677878,
 | |
|         "base_cid":17,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "column_id":18,
 | |
|         "table_id":1099511677878,
 | |
|         "column":"b",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677878,
 | |
|         "base_cid":18,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"a",
 | |
|         "expr_name":"a",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"b",
 | |
|         "expr_name":"b",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|        {
 | |
|         "table_id":1099511677878,
 | |
|         "is_join":false
 | |
|       }
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|     ],
 | |
|     "limit":null,
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":-1,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":false,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":0,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "order_by": [
 | |
|   ],
 | |
|   "limit": {
 | |
|     "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
 | |
|     }
 | |
|   },
 | |
|   "select": [
 | |
|      {
 | |
|       "expression": {
 | |
|         "item_type":"T_OP_UNION",
 | |
|         "result_type": {
 | |
|           "meta": {
 | |
|             "type":"INT",
 | |
|             "collation":"binary",
 | |
|             "coercibility":"NUMERIC"
 | |
|           },
 | |
|           "accuracy": {
 | |
|             "length":-1,
 | |
|             "precision":11,
 | |
|             "scale":0
 | |
|           },
 | |
|           "flag":1,
 | |
|           "calc_type": {
 | |
|             "type":"NULL",
 | |
|             "collation":"invalid_type",
 | |
|             "coercibility":"INVALID"
 | |
|           }
 | |
|         },
 | |
|         "expr_info": [
 | |
|           "IS_SET_OP",
 | |
|           "CNT_SET_OP"
 | |
|         ],
 | |
|         "rel_id": [
 | |
|         ],
 | |
|         "expr_level":0,
 | |
|         "expr_levels": [
 | |
|           0
 | |
|         ],
 | |
|         "children": [
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"INT",
 | |
|                 "collation":"binary",
 | |
|                 "coercibility":"NUMERIC"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":-1,
 | |
|                 "precision":11,
 | |
|                 "scale":0
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677877,
 | |
|             "column_id":17,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t1",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"a",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           },
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"INT",
 | |
|                 "collation":"binary",
 | |
|                 "coercibility":"NUMERIC"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":-1,
 | |
|                 "precision":11,
 | |
|                 "scale":0
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677878,
 | |
|             "column_id":17,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t2",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"a",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "is_alias":true,
 | |
|       "alias_name":"a",
 | |
|       "expr_name":"a",
 | |
|       "default": {
 | |
|         "NULL":"NULL"
 | |
|       }
 | |
|     },
 | |
|      {
 | |
|       "expression": {
 | |
|         "item_type":"T_OP_UNION",
 | |
|         "result_type": {
 | |
|           "meta": {
 | |
|             "type":"CHAR",
 | |
|             "collation":"utf8mb4_general_ci",
 | |
|             "coercibility":"IMPLICIT"
 | |
|           },
 | |
|           "accuracy": {
 | |
|             "length":10,
 | |
|             "precision":-1,
 | |
|             "scale":-1
 | |
|           },
 | |
|           "flag":1,
 | |
|           "calc_type": {
 | |
|             "type":"NULL",
 | |
|             "collation":"invalid_type",
 | |
|             "coercibility":"INVALID"
 | |
|           }
 | |
|         },
 | |
|         "expr_info": [
 | |
|           "IS_SET_OP",
 | |
|           "CNT_SET_OP"
 | |
|         ],
 | |
|         "rel_id": [
 | |
|         ],
 | |
|         "expr_level":0,
 | |
|         "expr_levels": [
 | |
|           0
 | |
|         ],
 | |
|         "children": [
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"CHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":10,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677877,
 | |
|             "column_id":18,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t1",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"b",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           },
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"CHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":10,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677878,
 | |
|             "column_id":18,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t2",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"b",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "is_alias":true,
 | |
|       "alias_name":"b",
 | |
|       "expr_name":"b",
 | |
|       "default": {
 | |
|         "NULL":"NULL"
 | |
|       }
 | |
|     }
 | |
|   ]
 | |
| }
 | |
| ***************   Case 14   ***************
 | |
| select a,b from t1 limit 1 union select a,b from t2 order by a limit 3;
 | |
| {
 | |
|   "set_op":1,
 | |
|   "distinct":true,
 | |
|   "left_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|        {
 | |
|         "table_id":1099511677877,
 | |
|         "table_name":"t1",
 | |
|         "alias_name":"",
 | |
|         "synonym_name":"",
 | |
|         "table_type":0,
 | |
|         "ref_id":1099511677877,
 | |
|         "database_name":"db_set",
 | |
|         "for_update":false,
 | |
|         "wait":-1,
 | |
|         "mock_id":-1,
 | |
|         "view_base_item":-1
 | |
|       }
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|        {
 | |
|         "column_id":17,
 | |
|         "table_id":1099511677877,
 | |
|         "column":"a",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677877,
 | |
|         "base_cid":17,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":2,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "column_id":18,
 | |
|         "table_id":1099511677877,
 | |
|         "column":"b",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677877,
 | |
|         "base_cid":18,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":2,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"a",
 | |
|         "expr_name":"a",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"b",
 | |
|         "expr_name":"b",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|        {
 | |
|         "table_id":1099511677877,
 | |
|         "is_join":false
 | |
|       }
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|     ],
 | |
|     "limit": {
 | |
|       "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
 | |
|       }
 | |
|     },
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":-1,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":false,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":0,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "right_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|        {
 | |
|         "table_id":1099511677878,
 | |
|         "table_name":"t2",
 | |
|         "alias_name":"",
 | |
|         "synonym_name":"",
 | |
|         "table_type":0,
 | |
|         "ref_id":1099511677878,
 | |
|         "database_name":"db_set",
 | |
|         "for_update":false,
 | |
|         "wait":-1,
 | |
|         "mock_id":-1,
 | |
|         "view_base_item":-1
 | |
|       }
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|        {
 | |
|         "column_id":17,
 | |
|         "table_id":1099511677878,
 | |
|         "column":"a",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677878,
 | |
|         "base_cid":17,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":2,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "column_id":18,
 | |
|         "table_id":1099511677878,
 | |
|         "column":"b",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677878,
 | |
|         "base_cid":18,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":2,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"a",
 | |
|         "expr_name":"a",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"b",
 | |
|         "expr_name":"b",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|        {
 | |
|         "table_id":1099511677878,
 | |
|         "is_join":false
 | |
|       }
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|     ],
 | |
|     "limit":null,
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":-1,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":false,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":0,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "order_by": [
 | |
|      {
 | |
|       "expression": {
 | |
|         "item_type":"T_OP_UNION",
 | |
|         "result_type": {
 | |
|           "meta": {
 | |
|             "type":"INT",
 | |
|             "collation":"binary",
 | |
|             "coercibility":"NUMERIC"
 | |
|           },
 | |
|           "accuracy": {
 | |
|             "length":-1,
 | |
|             "precision":11,
 | |
|             "scale":0
 | |
|           },
 | |
|           "flag":1,
 | |
|           "calc_type": {
 | |
|             "type":"NULL",
 | |
|             "collation":"invalid_type",
 | |
|             "coercibility":"INVALID"
 | |
|           }
 | |
|         },
 | |
|         "expr_info": [
 | |
|           "IS_SET_OP",
 | |
|           "CNT_SET_OP"
 | |
|         ],
 | |
|         "rel_id": [
 | |
|         ],
 | |
|         "expr_level":0,
 | |
|         "expr_levels": [
 | |
|           0
 | |
|         ],
 | |
|         "children": [
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"INT",
 | |
|                 "collation":"binary",
 | |
|                 "coercibility":"NUMERIC"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":-1,
 | |
|                 "precision":11,
 | |
|                 "scale":0
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677877,
 | |
|             "column_id":17,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t1",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"a",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":2,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           },
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"INT",
 | |
|                 "collation":"binary",
 | |
|                 "coercibility":"NUMERIC"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":-1,
 | |
|                 "precision":11,
 | |
|                 "scale":0
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677878,
 | |
|             "column_id":17,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t2",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"a",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":2,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "ascending":"ASC"
 | |
|     }
 | |
|   ],
 | |
|   "limit": {
 | |
|     "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
 | |
|     }
 | |
|   },
 | |
|   "select": [
 | |
|      {
 | |
|       "expression": {
 | |
|         "item_type":"T_OP_UNION",
 | |
|         "result_type": {
 | |
|           "meta": {
 | |
|             "type":"INT",
 | |
|             "collation":"binary",
 | |
|             "coercibility":"NUMERIC"
 | |
|           },
 | |
|           "accuracy": {
 | |
|             "length":-1,
 | |
|             "precision":11,
 | |
|             "scale":0
 | |
|           },
 | |
|           "flag":1,
 | |
|           "calc_type": {
 | |
|             "type":"NULL",
 | |
|             "collation":"invalid_type",
 | |
|             "coercibility":"INVALID"
 | |
|           }
 | |
|         },
 | |
|         "expr_info": [
 | |
|           "IS_SET_OP",
 | |
|           "CNT_SET_OP"
 | |
|         ],
 | |
|         "rel_id": [
 | |
|         ],
 | |
|         "expr_level":0,
 | |
|         "expr_levels": [
 | |
|           0
 | |
|         ],
 | |
|         "children": [
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"INT",
 | |
|                 "collation":"binary",
 | |
|                 "coercibility":"NUMERIC"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":-1,
 | |
|                 "precision":11,
 | |
|                 "scale":0
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677877,
 | |
|             "column_id":17,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t1",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"a",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":2,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           },
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"INT",
 | |
|                 "collation":"binary",
 | |
|                 "coercibility":"NUMERIC"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":-1,
 | |
|                 "precision":11,
 | |
|                 "scale":0
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677878,
 | |
|             "column_id":17,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t2",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"a",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":2,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "is_alias":true,
 | |
|       "alias_name":"a",
 | |
|       "expr_name":"a",
 | |
|       "default": {
 | |
|         "NULL":"NULL"
 | |
|       }
 | |
|     },
 | |
|      {
 | |
|       "expression": {
 | |
|         "item_type":"T_OP_UNION",
 | |
|         "result_type": {
 | |
|           "meta": {
 | |
|             "type":"CHAR",
 | |
|             "collation":"utf8mb4_general_ci",
 | |
|             "coercibility":"IMPLICIT"
 | |
|           },
 | |
|           "accuracy": {
 | |
|             "length":10,
 | |
|             "precision":-1,
 | |
|             "scale":-1
 | |
|           },
 | |
|           "flag":1,
 | |
|           "calc_type": {
 | |
|             "type":"NULL",
 | |
|             "collation":"invalid_type",
 | |
|             "coercibility":"INVALID"
 | |
|           }
 | |
|         },
 | |
|         "expr_info": [
 | |
|           "IS_SET_OP",
 | |
|           "CNT_SET_OP"
 | |
|         ],
 | |
|         "rel_id": [
 | |
|         ],
 | |
|         "expr_level":0,
 | |
|         "expr_levels": [
 | |
|           0
 | |
|         ],
 | |
|         "children": [
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"CHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":10,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677877,
 | |
|             "column_id":18,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t1",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"b",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           },
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"CHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":10,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677878,
 | |
|             "column_id":18,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t2",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"b",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "is_alias":true,
 | |
|       "alias_name":"b",
 | |
|       "expr_name":"b",
 | |
|       "default": {
 | |
|         "NULL":"NULL"
 | |
|       }
 | |
|     }
 | |
|   ]
 | |
| }
 | |
| ***************   Case 15   ***************
 | |
| (select a,b from t1 limit 1) union (select a,b from t2 order by a limit 3);
 | |
| {
 | |
|   "set_op":1,
 | |
|   "distinct":true,
 | |
|   "left_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|        {
 | |
|         "table_id":1099511677877,
 | |
|         "table_name":"t1",
 | |
|         "alias_name":"",
 | |
|         "synonym_name":"",
 | |
|         "table_type":0,
 | |
|         "ref_id":1099511677877,
 | |
|         "database_name":"db_set",
 | |
|         "for_update":false,
 | |
|         "wait":-1,
 | |
|         "mock_id":-1,
 | |
|         "view_base_item":-1
 | |
|       }
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|        {
 | |
|         "column_id":17,
 | |
|         "table_id":1099511677877,
 | |
|         "column":"a",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677877,
 | |
|         "base_cid":17,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "column_id":18,
 | |
|         "table_id":1099511677877,
 | |
|         "column":"b",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677877,
 | |
|         "base_cid":18,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"a",
 | |
|         "expr_name":"a",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"b",
 | |
|         "expr_name":"b",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|        {
 | |
|         "table_id":1099511677877,
 | |
|         "is_join":false
 | |
|       }
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|     ],
 | |
|     "limit": {
 | |
|       "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
 | |
|       }
 | |
|     },
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":-1,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":false,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":0,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "right_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|        {
 | |
|         "table_id":1099511677878,
 | |
|         "table_name":"t2",
 | |
|         "alias_name":"",
 | |
|         "synonym_name":"",
 | |
|         "table_type":0,
 | |
|         "ref_id":1099511677878,
 | |
|         "database_name":"db_set",
 | |
|         "for_update":false,
 | |
|         "wait":-1,
 | |
|         "mock_id":-1,
 | |
|         "view_base_item":-1
 | |
|       }
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|        {
 | |
|         "column_id":17,
 | |
|         "table_id":1099511677878,
 | |
|         "column":"a",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677878,
 | |
|         "base_cid":17,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":2,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "column_id":18,
 | |
|         "table_id":1099511677878,
 | |
|         "column":"b",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677878,
 | |
|         "base_cid":18,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":2,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"a",
 | |
|         "expr_name":"a",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"b",
 | |
|         "expr_name":"b",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|        {
 | |
|         "table_id":1099511677878,
 | |
|         "is_join":false
 | |
|       }
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":2,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "ascending":"ASC"
 | |
|       }
 | |
|     ],
 | |
|     "limit": {
 | |
|       "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
 | |
|       }
 | |
|     },
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":-1,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":false,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":0,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "order_by": [
 | |
|   ],
 | |
|   "limit":null,
 | |
|   "select": [
 | |
|      {
 | |
|       "expression": {
 | |
|         "item_type":"T_OP_UNION",
 | |
|         "result_type": {
 | |
|           "meta": {
 | |
|             "type":"INT",
 | |
|             "collation":"binary",
 | |
|             "coercibility":"NUMERIC"
 | |
|           },
 | |
|           "accuracy": {
 | |
|             "length":-1,
 | |
|             "precision":11,
 | |
|             "scale":0
 | |
|           },
 | |
|           "flag":1,
 | |
|           "calc_type": {
 | |
|             "type":"NULL",
 | |
|             "collation":"invalid_type",
 | |
|             "coercibility":"INVALID"
 | |
|           }
 | |
|         },
 | |
|         "expr_info": [
 | |
|           "IS_SET_OP",
 | |
|           "CNT_SET_OP"
 | |
|         ],
 | |
|         "rel_id": [
 | |
|         ],
 | |
|         "expr_level":0,
 | |
|         "expr_levels": [
 | |
|           0
 | |
|         ],
 | |
|         "children": [
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"INT",
 | |
|                 "collation":"binary",
 | |
|                 "coercibility":"NUMERIC"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":-1,
 | |
|                 "precision":11,
 | |
|                 "scale":0
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677877,
 | |
|             "column_id":17,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t1",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"a",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           },
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"INT",
 | |
|                 "collation":"binary",
 | |
|                 "coercibility":"NUMERIC"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":-1,
 | |
|                 "precision":11,
 | |
|                 "scale":0
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677878,
 | |
|             "column_id":17,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t2",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"a",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":2,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "is_alias":true,
 | |
|       "alias_name":"a",
 | |
|       "expr_name":"a",
 | |
|       "default": {
 | |
|         "NULL":"NULL"
 | |
|       }
 | |
|     },
 | |
|      {
 | |
|       "expression": {
 | |
|         "item_type":"T_OP_UNION",
 | |
|         "result_type": {
 | |
|           "meta": {
 | |
|             "type":"CHAR",
 | |
|             "collation":"utf8mb4_general_ci",
 | |
|             "coercibility":"IMPLICIT"
 | |
|           },
 | |
|           "accuracy": {
 | |
|             "length":10,
 | |
|             "precision":-1,
 | |
|             "scale":-1
 | |
|           },
 | |
|           "flag":1,
 | |
|           "calc_type": {
 | |
|             "type":"NULL",
 | |
|             "collation":"invalid_type",
 | |
|             "coercibility":"INVALID"
 | |
|           }
 | |
|         },
 | |
|         "expr_info": [
 | |
|           "IS_SET_OP",
 | |
|           "CNT_SET_OP"
 | |
|         ],
 | |
|         "rel_id": [
 | |
|         ],
 | |
|         "expr_level":0,
 | |
|         "expr_levels": [
 | |
|           0
 | |
|         ],
 | |
|         "children": [
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"CHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":10,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677877,
 | |
|             "column_id":18,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t1",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"b",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           },
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"CHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":10,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677878,
 | |
|             "column_id":18,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t2",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"b",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "is_alias":true,
 | |
|       "alias_name":"b",
 | |
|       "expr_name":"b",
 | |
|       "default": {
 | |
|         "NULL":"NULL"
 | |
|       }
 | |
|     }
 | |
|   ]
 | |
| }
 | |
| ***************   Case 16   ***************
 | |
| (select a,b from t1 limit 1) union (select a,b from t2 order by a limit 3) limit 1;
 | |
| {
 | |
|   "set_op":1,
 | |
|   "distinct":true,
 | |
|   "left_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|        {
 | |
|         "table_id":1099511677877,
 | |
|         "table_name":"t1",
 | |
|         "alias_name":"",
 | |
|         "synonym_name":"",
 | |
|         "table_type":0,
 | |
|         "ref_id":1099511677877,
 | |
|         "database_name":"db_set",
 | |
|         "for_update":false,
 | |
|         "wait":-1,
 | |
|         "mock_id":-1,
 | |
|         "view_base_item":-1
 | |
|       }
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|        {
 | |
|         "column_id":17,
 | |
|         "table_id":1099511677877,
 | |
|         "column":"a",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677877,
 | |
|         "base_cid":17,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "column_id":18,
 | |
|         "table_id":1099511677877,
 | |
|         "column":"b",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677877,
 | |
|         "base_cid":18,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"a",
 | |
|         "expr_name":"a",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"b",
 | |
|         "expr_name":"b",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|        {
 | |
|         "table_id":1099511677877,
 | |
|         "is_join":false
 | |
|       }
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|     ],
 | |
|     "limit": {
 | |
|       "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
 | |
|       }
 | |
|     },
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":-1,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":false,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":0,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "right_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|        {
 | |
|         "table_id":1099511677878,
 | |
|         "table_name":"t2",
 | |
|         "alias_name":"",
 | |
|         "synonym_name":"",
 | |
|         "table_type":0,
 | |
|         "ref_id":1099511677878,
 | |
|         "database_name":"db_set",
 | |
|         "for_update":false,
 | |
|         "wait":-1,
 | |
|         "mock_id":-1,
 | |
|         "view_base_item":-1
 | |
|       }
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|        {
 | |
|         "column_id":17,
 | |
|         "table_id":1099511677878,
 | |
|         "column":"a",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677878,
 | |
|         "base_cid":17,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":2,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "column_id":18,
 | |
|         "table_id":1099511677878,
 | |
|         "column":"b",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677878,
 | |
|         "base_cid":18,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":2,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"a",
 | |
|         "expr_name":"a",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"b",
 | |
|         "expr_name":"b",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|        {
 | |
|         "table_id":1099511677878,
 | |
|         "is_join":false
 | |
|       }
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":2,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "ascending":"ASC"
 | |
|       }
 | |
|     ],
 | |
|     "limit": {
 | |
|       "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
 | |
|       }
 | |
|     },
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":-1,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":false,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":0,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "order_by": [
 | |
|   ],
 | |
|   "limit": {
 | |
|     "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
 | |
|     }
 | |
|   },
 | |
|   "select": [
 | |
|      {
 | |
|       "expression": {
 | |
|         "item_type":"T_OP_UNION",
 | |
|         "result_type": {
 | |
|           "meta": {
 | |
|             "type":"INT",
 | |
|             "collation":"binary",
 | |
|             "coercibility":"NUMERIC"
 | |
|           },
 | |
|           "accuracy": {
 | |
|             "length":-1,
 | |
|             "precision":11,
 | |
|             "scale":0
 | |
|           },
 | |
|           "flag":1,
 | |
|           "calc_type": {
 | |
|             "type":"NULL",
 | |
|             "collation":"invalid_type",
 | |
|             "coercibility":"INVALID"
 | |
|           }
 | |
|         },
 | |
|         "expr_info": [
 | |
|           "IS_SET_OP",
 | |
|           "CNT_SET_OP"
 | |
|         ],
 | |
|         "rel_id": [
 | |
|         ],
 | |
|         "expr_level":0,
 | |
|         "expr_levels": [
 | |
|           0
 | |
|         ],
 | |
|         "children": [
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"INT",
 | |
|                 "collation":"binary",
 | |
|                 "coercibility":"NUMERIC"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":-1,
 | |
|                 "precision":11,
 | |
|                 "scale":0
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677877,
 | |
|             "column_id":17,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t1",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"a",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           },
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"INT",
 | |
|                 "collation":"binary",
 | |
|                 "coercibility":"NUMERIC"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":-1,
 | |
|                 "precision":11,
 | |
|                 "scale":0
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677878,
 | |
|             "column_id":17,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t2",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"a",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":2,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "is_alias":true,
 | |
|       "alias_name":"a",
 | |
|       "expr_name":"a",
 | |
|       "default": {
 | |
|         "NULL":"NULL"
 | |
|       }
 | |
|     },
 | |
|      {
 | |
|       "expression": {
 | |
|         "item_type":"T_OP_UNION",
 | |
|         "result_type": {
 | |
|           "meta": {
 | |
|             "type":"CHAR",
 | |
|             "collation":"utf8mb4_general_ci",
 | |
|             "coercibility":"IMPLICIT"
 | |
|           },
 | |
|           "accuracy": {
 | |
|             "length":10,
 | |
|             "precision":-1,
 | |
|             "scale":-1
 | |
|           },
 | |
|           "flag":1,
 | |
|           "calc_type": {
 | |
|             "type":"NULL",
 | |
|             "collation":"invalid_type",
 | |
|             "coercibility":"INVALID"
 | |
|           }
 | |
|         },
 | |
|         "expr_info": [
 | |
|           "IS_SET_OP",
 | |
|           "CNT_SET_OP"
 | |
|         ],
 | |
|         "rel_id": [
 | |
|         ],
 | |
|         "expr_level":0,
 | |
|         "expr_levels": [
 | |
|           0
 | |
|         ],
 | |
|         "children": [
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"CHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":10,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677877,
 | |
|             "column_id":18,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t1",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"b",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           },
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"CHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":10,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677878,
 | |
|             "column_id":18,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t2",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"b",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "is_alias":true,
 | |
|       "alias_name":"b",
 | |
|       "expr_name":"b",
 | |
|       "default": {
 | |
|         "NULL":"NULL"
 | |
|       }
 | |
|     }
 | |
|   ]
 | |
| }
 | |
| ***************   Case 17   ***************
 | |
| select a,b from t1 union (select a,b from t2 order by a limit 3);
 | |
| {
 | |
|   "set_op":1,
 | |
|   "distinct":true,
 | |
|   "left_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|        {
 | |
|         "table_id":1099511677877,
 | |
|         "table_name":"t1",
 | |
|         "alias_name":"",
 | |
|         "synonym_name":"",
 | |
|         "table_type":0,
 | |
|         "ref_id":1099511677877,
 | |
|         "database_name":"db_set",
 | |
|         "for_update":false,
 | |
|         "wait":-1,
 | |
|         "mock_id":-1,
 | |
|         "view_base_item":-1
 | |
|       }
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|        {
 | |
|         "column_id":17,
 | |
|         "table_id":1099511677877,
 | |
|         "column":"a",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677877,
 | |
|         "base_cid":17,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "column_id":18,
 | |
|         "table_id":1099511677877,
 | |
|         "column":"b",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677877,
 | |
|         "base_cid":18,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"a",
 | |
|         "expr_name":"a",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"b",
 | |
|         "expr_name":"b",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|        {
 | |
|         "table_id":1099511677877,
 | |
|         "is_join":false
 | |
|       }
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|     ],
 | |
|     "limit":null,
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":-1,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":false,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":0,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "right_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|        {
 | |
|         "table_id":1099511677878,
 | |
|         "table_name":"t2",
 | |
|         "alias_name":"",
 | |
|         "synonym_name":"",
 | |
|         "table_type":0,
 | |
|         "ref_id":1099511677878,
 | |
|         "database_name":"db_set",
 | |
|         "for_update":false,
 | |
|         "wait":-1,
 | |
|         "mock_id":-1,
 | |
|         "view_base_item":-1
 | |
|       }
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|        {
 | |
|         "column_id":17,
 | |
|         "table_id":1099511677878,
 | |
|         "column":"a",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677878,
 | |
|         "base_cid":17,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":2,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "column_id":18,
 | |
|         "table_id":1099511677878,
 | |
|         "column":"b",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677878,
 | |
|         "base_cid":18,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":2,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"a",
 | |
|         "expr_name":"a",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       },
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"CHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":10,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":18,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"b",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"b",
 | |
|         "expr_name":"b",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|        {
 | |
|         "table_id":1099511677878,
 | |
|         "is_join":false
 | |
|       }
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":2,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "ascending":"ASC"
 | |
|       }
 | |
|     ],
 | |
|     "limit": {
 | |
|       "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
 | |
|       }
 | |
|     },
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":-1,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":false,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":0,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "order_by": [
 | |
|   ],
 | |
|   "limit":null,
 | |
|   "select": [
 | |
|      {
 | |
|       "expression": {
 | |
|         "item_type":"T_OP_UNION",
 | |
|         "result_type": {
 | |
|           "meta": {
 | |
|             "type":"INT",
 | |
|             "collation":"binary",
 | |
|             "coercibility":"NUMERIC"
 | |
|           },
 | |
|           "accuracy": {
 | |
|             "length":-1,
 | |
|             "precision":11,
 | |
|             "scale":0
 | |
|           },
 | |
|           "flag":1,
 | |
|           "calc_type": {
 | |
|             "type":"NULL",
 | |
|             "collation":"invalid_type",
 | |
|             "coercibility":"INVALID"
 | |
|           }
 | |
|         },
 | |
|         "expr_info": [
 | |
|           "IS_SET_OP",
 | |
|           "CNT_SET_OP"
 | |
|         ],
 | |
|         "rel_id": [
 | |
|         ],
 | |
|         "expr_level":0,
 | |
|         "expr_levels": [
 | |
|           0
 | |
|         ],
 | |
|         "children": [
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"INT",
 | |
|                 "collation":"binary",
 | |
|                 "coercibility":"NUMERIC"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":-1,
 | |
|                 "precision":11,
 | |
|                 "scale":0
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677877,
 | |
|             "column_id":17,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t1",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"a",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           },
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"INT",
 | |
|                 "collation":"binary",
 | |
|                 "coercibility":"NUMERIC"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":-1,
 | |
|                 "precision":11,
 | |
|                 "scale":0
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677878,
 | |
|             "column_id":17,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t2",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"a",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":2,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "is_alias":true,
 | |
|       "alias_name":"a",
 | |
|       "expr_name":"a",
 | |
|       "default": {
 | |
|         "NULL":"NULL"
 | |
|       }
 | |
|     },
 | |
|      {
 | |
|       "expression": {
 | |
|         "item_type":"T_OP_UNION",
 | |
|         "result_type": {
 | |
|           "meta": {
 | |
|             "type":"CHAR",
 | |
|             "collation":"utf8mb4_general_ci",
 | |
|             "coercibility":"IMPLICIT"
 | |
|           },
 | |
|           "accuracy": {
 | |
|             "length":10,
 | |
|             "precision":-1,
 | |
|             "scale":-1
 | |
|           },
 | |
|           "flag":1,
 | |
|           "calc_type": {
 | |
|             "type":"NULL",
 | |
|             "collation":"invalid_type",
 | |
|             "coercibility":"INVALID"
 | |
|           }
 | |
|         },
 | |
|         "expr_info": [
 | |
|           "IS_SET_OP",
 | |
|           "CNT_SET_OP"
 | |
|         ],
 | |
|         "rel_id": [
 | |
|         ],
 | |
|         "expr_level":0,
 | |
|         "expr_levels": [
 | |
|           0
 | |
|         ],
 | |
|         "children": [
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"CHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":10,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677877,
 | |
|             "column_id":18,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t1",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"b",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           },
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"CHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":10,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677878,
 | |
|             "column_id":18,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t2",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"b",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "is_alias":true,
 | |
|       "alias_name":"b",
 | |
|       "expr_name":"b",
 | |
|       "default": {
 | |
|         "NULL":"NULL"
 | |
|       }
 | |
|     }
 | |
|   ]
 | |
| }
 | |
| ***************   Case 18   ***************
 | |
| (select a from t1) union select a from t2;
 | |
| {
 | |
|   "set_op":1,
 | |
|   "distinct":true,
 | |
|   "left_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|        {
 | |
|         "table_id":1099511677877,
 | |
|         "table_name":"t1",
 | |
|         "alias_name":"",
 | |
|         "synonym_name":"",
 | |
|         "table_type":0,
 | |
|         "ref_id":1099511677877,
 | |
|         "database_name":"db_set",
 | |
|         "for_update":false,
 | |
|         "wait":-1,
 | |
|         "mock_id":-1,
 | |
|         "view_base_item":-1
 | |
|       }
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|        {
 | |
|         "column_id":17,
 | |
|         "table_id":1099511677877,
 | |
|         "column":"a",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677877,
 | |
|         "base_cid":17,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677877,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t1",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"a",
 | |
|         "expr_name":"a",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|        {
 | |
|         "table_id":1099511677877,
 | |
|         "is_join":false
 | |
|       }
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|     ],
 | |
|     "limit":null,
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":-1,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":false,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":0,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "right_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|        {
 | |
|         "table_id":1099511677878,
 | |
|         "table_name":"t2",
 | |
|         "alias_name":"",
 | |
|         "synonym_name":"",
 | |
|         "table_type":0,
 | |
|         "ref_id":1099511677878,
 | |
|         "database_name":"db_set",
 | |
|         "for_update":false,
 | |
|         "wait":-1,
 | |
|         "mock_id":-1,
 | |
|         "view_base_item":-1
 | |
|       }
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|        {
 | |
|         "column_id":17,
 | |
|         "table_id":1099511677878,
 | |
|         "column":"a",
 | |
|         "auto_filled_timestamp":false,
 | |
|         "default_value": {
 | |
|           "NULL":"NULL"
 | |
|         },
 | |
|         "base_tid":1099511677878,
 | |
|         "base_cid":17,
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_REF_COLUMN",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"INT",
 | |
|               "collation":"binary",
 | |
|               "coercibility":"NUMERIC"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":-1,
 | |
|               "precision":11,
 | |
|               "scale":0
 | |
|             },
 | |
|             "flag":1,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_COLUMN",
 | |
|             "CNT_COLUMN"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|             1
 | |
|           ],
 | |
|           "table_id":1099511677878,
 | |
|           "column_id":17,
 | |
|           "database_name":"db_set",
 | |
|           "table_name":"t2",
 | |
|           "synonym_name":"",
 | |
|           "column_name":"a",
 | |
|           "expr_level":0,
 | |
|           "expr_levels": [
 | |
|             0
 | |
|           ],
 | |
|           "column_flags":0,
 | |
|           "is_explicited_referece":true,
 | |
|           "explicited_ref_count":1,
 | |
|           "enum_set_values": [
 | |
|           ],
 | |
|           "is_lob_column":false
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"a",
 | |
|         "expr_name":"a",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|        {
 | |
|         "table_id":1099511677878,
 | |
|         "is_join":false
 | |
|       }
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|     ],
 | |
|     "limit":null,
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":-1,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":false,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":0,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "order_by": [
 | |
|   ],
 | |
|   "limit":null,
 | |
|   "select": [
 | |
|      {
 | |
|       "expression": {
 | |
|         "item_type":"T_OP_UNION",
 | |
|         "result_type": {
 | |
|           "meta": {
 | |
|             "type":"INT",
 | |
|             "collation":"binary",
 | |
|             "coercibility":"NUMERIC"
 | |
|           },
 | |
|           "accuracy": {
 | |
|             "length":-1,
 | |
|             "precision":11,
 | |
|             "scale":0
 | |
|           },
 | |
|           "flag":1,
 | |
|           "calc_type": {
 | |
|             "type":"NULL",
 | |
|             "collation":"invalid_type",
 | |
|             "coercibility":"INVALID"
 | |
|           }
 | |
|         },
 | |
|         "expr_info": [
 | |
|           "IS_SET_OP",
 | |
|           "CNT_SET_OP"
 | |
|         ],
 | |
|         "rel_id": [
 | |
|         ],
 | |
|         "expr_level":0,
 | |
|         "expr_levels": [
 | |
|           0
 | |
|         ],
 | |
|         "children": [
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"INT",
 | |
|                 "collation":"binary",
 | |
|                 "coercibility":"NUMERIC"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":-1,
 | |
|                 "precision":11,
 | |
|                 "scale":0
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677877,
 | |
|             "column_id":17,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t1",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"a",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           },
 | |
|            {
 | |
|             "item_type":"T_REF_COLUMN",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"INT",
 | |
|                 "collation":"binary",
 | |
|                 "coercibility":"NUMERIC"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":-1,
 | |
|                 "precision":11,
 | |
|                 "scale":0
 | |
|               },
 | |
|               "flag":1,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_COLUMN",
 | |
|               "CNT_COLUMN"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|               1
 | |
|             ],
 | |
|             "table_id":1099511677878,
 | |
|             "column_id":17,
 | |
|             "database_name":"db_set",
 | |
|             "table_name":"t2",
 | |
|             "synonym_name":"",
 | |
|             "column_name":"a",
 | |
|             "expr_level":0,
 | |
|             "expr_levels": [
 | |
|               0
 | |
|             ],
 | |
|             "column_flags":0,
 | |
|             "is_explicited_referece":true,
 | |
|             "explicited_ref_count":1,
 | |
|             "enum_set_values": [
 | |
|             ],
 | |
|             "is_lob_column":false
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "is_alias":true,
 | |
|       "alias_name":"a",
 | |
|       "expr_name":"a",
 | |
|       "default": {
 | |
|         "NULL":"NULL"
 | |
|       }
 | |
|     }
 | |
|   ]
 | |
| }
 | |
| ***************   Case 19   ***************
 | |
| select 'test' union select 'test2';
 | |
| {
 | |
|   "set_op":1,
 | |
|   "distinct":true,
 | |
|   "left_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_QUESTIONMARK",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"VARCHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":5,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":0,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_CONST",
 | |
|             "IS_STATIC_PARAM",
 | |
|             "CNT_CONST",
 | |
|             "CNT_STATIC_PARAM",
 | |
|             "IS_DYNAMIC_PARAM"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|           ],
 | |
|           "value": {
 | |
|             "UNKNOWN":0
 | |
|           }
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"test",
 | |
|         "expr_name":"test",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|     ],
 | |
|     "limit":null,
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":-1,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":false,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":2,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|          {
 | |
|           "expression": {
 | |
|             "item_type":"T_FUN_SYS_CAST",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"VARCHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":5,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":0,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_CONST",
 | |
|               "IS_FUNC",
 | |
|               "IS_CALCULABLE_EXPR",
 | |
|               "IS_CONST_EXPR",
 | |
|               "CNT_CONST",
 | |
|               "CNT_FUNC",
 | |
|               "CNT_CALCULABLE_EXPR"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|             ],
 | |
|             "expr_levels": [
 | |
|             ],
 | |
|             "func":"cast",
 | |
|             "children": [
 | |
|                {
 | |
|                 "item_type":"T_VARCHAR",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"VARCHAR",
 | |
|                     "collation":"utf8mb4_general_ci",
 | |
|                     "coercibility":"COERCIBLE"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":4,
 | |
|                     "precision":1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "VARCHAR":"test",
 | |
|                   "collation":"utf8mb4_general_ci"
 | |
|                 }
 | |
|               },
 | |
|                {
 | |
|                 "item_type":"T_INT",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"BIGINT",
 | |
|                     "collation":"binary",
 | |
|                     "coercibility":"NUMERIC"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":-1,
 | |
|                     "precision":-1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "BIGINT":21477785622
 | |
|                 }
 | |
|               }
 | |
|             ],
 | |
|             "enum_set_values": [
 | |
|             ]
 | |
|           },
 | |
|           "idx":0
 | |
|         },
 | |
|          {
 | |
|           "expression": {
 | |
|             "item_type":"T_FUN_SYS_CAST",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"VARCHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":5,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":0,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_CONST",
 | |
|               "IS_FUNC",
 | |
|               "IS_CALCULABLE_EXPR",
 | |
|               "IS_CONST_EXPR",
 | |
|               "CNT_CONST",
 | |
|               "CNT_FUNC",
 | |
|               "CNT_CALCULABLE_EXPR"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|             ],
 | |
|             "expr_levels": [
 | |
|             ],
 | |
|             "func":"cast",
 | |
|             "children": [
 | |
|                {
 | |
|                 "item_type":"T_VARCHAR",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"VARCHAR",
 | |
|                     "collation":"utf8mb4_general_ci",
 | |
|                     "coercibility":"COERCIBLE"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":5,
 | |
|                     "precision":1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "VARCHAR":"test2",
 | |
|                   "collation":"utf8mb4_general_ci"
 | |
|                 }
 | |
|               },
 | |
|                {
 | |
|                 "item_type":"T_INT",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"BIGINT",
 | |
|                     "collation":"binary",
 | |
|                     "coercibility":"NUMERIC"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":-1,
 | |
|                     "precision":-1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "BIGINT":21477785622
 | |
|                 }
 | |
|               }
 | |
|             ],
 | |
|             "enum_set_values": [
 | |
|             ]
 | |
|           },
 | |
|           "idx":1
 | |
|         }
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "right_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_QUESTIONMARK",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"VARCHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":5,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":0,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_CONST",
 | |
|             "IS_STATIC_PARAM",
 | |
|             "CNT_CONST",
 | |
|             "CNT_STATIC_PARAM",
 | |
|             "IS_DYNAMIC_PARAM"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|           ],
 | |
|           "value": {
 | |
|             "UNKNOWN":1
 | |
|           }
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"test2",
 | |
|         "expr_name":"test2",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|     ],
 | |
|     "limit":null,
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":-1,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":false,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":2,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|          {
 | |
|           "expression": {
 | |
|             "item_type":"T_FUN_SYS_CAST",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"VARCHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":5,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":0,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_CONST",
 | |
|               "IS_FUNC",
 | |
|               "IS_CALCULABLE_EXPR",
 | |
|               "IS_CONST_EXPR",
 | |
|               "CNT_CONST",
 | |
|               "CNT_FUNC",
 | |
|               "CNT_CALCULABLE_EXPR"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|             ],
 | |
|             "expr_levels": [
 | |
|             ],
 | |
|             "func":"cast",
 | |
|             "children": [
 | |
|                {
 | |
|                 "item_type":"T_VARCHAR",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"VARCHAR",
 | |
|                     "collation":"utf8mb4_general_ci",
 | |
|                     "coercibility":"COERCIBLE"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":4,
 | |
|                     "precision":1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "VARCHAR":"test",
 | |
|                   "collation":"utf8mb4_general_ci"
 | |
|                 }
 | |
|               },
 | |
|                {
 | |
|                 "item_type":"T_INT",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"BIGINT",
 | |
|                     "collation":"binary",
 | |
|                     "coercibility":"NUMERIC"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":-1,
 | |
|                     "precision":-1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "BIGINT":21477785622
 | |
|                 }
 | |
|               }
 | |
|             ],
 | |
|             "enum_set_values": [
 | |
|             ]
 | |
|           },
 | |
|           "idx":0
 | |
|         },
 | |
|          {
 | |
|           "expression": {
 | |
|             "item_type":"T_FUN_SYS_CAST",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"VARCHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":5,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":0,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_CONST",
 | |
|               "IS_FUNC",
 | |
|               "IS_CALCULABLE_EXPR",
 | |
|               "IS_CONST_EXPR",
 | |
|               "CNT_CONST",
 | |
|               "CNT_FUNC",
 | |
|               "CNT_CALCULABLE_EXPR"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|             ],
 | |
|             "expr_levels": [
 | |
|             ],
 | |
|             "func":"cast",
 | |
|             "children": [
 | |
|                {
 | |
|                 "item_type":"T_VARCHAR",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"VARCHAR",
 | |
|                     "collation":"utf8mb4_general_ci",
 | |
|                     "coercibility":"COERCIBLE"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":5,
 | |
|                     "precision":1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "VARCHAR":"test2",
 | |
|                   "collation":"utf8mb4_general_ci"
 | |
|                 }
 | |
|               },
 | |
|                {
 | |
|                 "item_type":"T_INT",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"BIGINT",
 | |
|                     "collation":"binary",
 | |
|                     "coercibility":"NUMERIC"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":-1,
 | |
|                     "precision":-1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "BIGINT":21477785622
 | |
|                 }
 | |
|               }
 | |
|             ],
 | |
|             "enum_set_values": [
 | |
|             ]
 | |
|           },
 | |
|           "idx":1
 | |
|         }
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "order_by": [
 | |
|   ],
 | |
|   "limit":null,
 | |
|   "select": [
 | |
|      {
 | |
|       "expression": {
 | |
|         "item_type":"T_OP_UNION",
 | |
|         "result_type": {
 | |
|           "meta": {
 | |
|             "type":"VARCHAR",
 | |
|             "collation":"utf8mb4_general_ci",
 | |
|             "coercibility":"COERCIBLE"
 | |
|           },
 | |
|           "accuracy": {
 | |
|             "length":5,
 | |
|             "precision":-1,
 | |
|             "scale":-1
 | |
|           },
 | |
|           "flag":0,
 | |
|           "calc_type": {
 | |
|             "type":"NULL",
 | |
|             "collation":"invalid_type",
 | |
|             "coercibility":"INVALID"
 | |
|           }
 | |
|         },
 | |
|         "expr_info": [
 | |
|           "IS_SET_OP",
 | |
|           "CNT_SET_OP"
 | |
|         ],
 | |
|         "rel_id": [
 | |
|         ],
 | |
|         "expr_level":0,
 | |
|         "expr_levels": [
 | |
|           0
 | |
|         ],
 | |
|         "children": [
 | |
|            {
 | |
|             "item_type":"T_FUN_SYS_CAST",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"VARCHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":5,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":0,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_CONST",
 | |
|               "IS_FUNC",
 | |
|               "IS_CALCULABLE_EXPR",
 | |
|               "IS_CONST_EXPR",
 | |
|               "CNT_CONST",
 | |
|               "CNT_FUNC",
 | |
|               "CNT_CALCULABLE_EXPR"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|             ],
 | |
|             "expr_levels": [
 | |
|             ],
 | |
|             "func":"cast",
 | |
|             "children": [
 | |
|                {
 | |
|                 "item_type":"T_VARCHAR",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"VARCHAR",
 | |
|                     "collation":"utf8mb4_general_ci",
 | |
|                     "coercibility":"COERCIBLE"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":4,
 | |
|                     "precision":1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "VARCHAR":"test",
 | |
|                   "collation":"utf8mb4_general_ci"
 | |
|                 }
 | |
|               },
 | |
|                {
 | |
|                 "item_type":"T_INT",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"BIGINT",
 | |
|                     "collation":"binary",
 | |
|                     "coercibility":"NUMERIC"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":-1,
 | |
|                     "precision":-1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "BIGINT":21477785622
 | |
|                 }
 | |
|               }
 | |
|             ],
 | |
|             "enum_set_values": [
 | |
|             ]
 | |
|           },
 | |
|            {
 | |
|             "item_type":"T_FUN_SYS_CAST",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"VARCHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":5,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":0,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_CONST",
 | |
|               "IS_FUNC",
 | |
|               "IS_CALCULABLE_EXPR",
 | |
|               "IS_CONST_EXPR",
 | |
|               "CNT_CONST",
 | |
|               "CNT_FUNC",
 | |
|               "CNT_CALCULABLE_EXPR"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|             ],
 | |
|             "expr_levels": [
 | |
|             ],
 | |
|             "func":"cast",
 | |
|             "children": [
 | |
|                {
 | |
|                 "item_type":"T_VARCHAR",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"VARCHAR",
 | |
|                     "collation":"utf8mb4_general_ci",
 | |
|                     "coercibility":"COERCIBLE"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":5,
 | |
|                     "precision":1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "VARCHAR":"test2",
 | |
|                   "collation":"utf8mb4_general_ci"
 | |
|                 }
 | |
|               },
 | |
|                {
 | |
|                 "item_type":"T_INT",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"BIGINT",
 | |
|                     "collation":"binary",
 | |
|                     "coercibility":"NUMERIC"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":-1,
 | |
|                     "precision":-1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "BIGINT":21477785622
 | |
|                 }
 | |
|               }
 | |
|             ],
 | |
|             "enum_set_values": [
 | |
|             ]
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "is_alias":true,
 | |
|       "alias_name":"test",
 | |
|       "expr_name":"test",
 | |
|       "default": {
 | |
|         "NULL":"NULL"
 | |
|       }
 | |
|     }
 | |
|   ]
 | |
| }
 | |
| ***************   Case 20   ***************
 | |
| select 'test' limit 1 union select 'test2';
 | |
| {
 | |
|   "set_op":1,
 | |
|   "distinct":true,
 | |
|   "left_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_QUESTIONMARK",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"VARCHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":5,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":0,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_CONST",
 | |
|             "IS_STATIC_PARAM",
 | |
|             "CNT_CONST",
 | |
|             "CNT_STATIC_PARAM",
 | |
|             "IS_DYNAMIC_PARAM"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|           ],
 | |
|           "value": {
 | |
|             "UNKNOWN":0
 | |
|           }
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"test",
 | |
|         "expr_name":"test",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|     ],
 | |
|     "limit": {
 | |
|       "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
 | |
|       }
 | |
|     },
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":-1,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":false,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":2,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|          {
 | |
|           "expression": {
 | |
|             "item_type":"T_FUN_SYS_CAST",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"VARCHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":5,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":0,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_CONST",
 | |
|               "IS_FUNC",
 | |
|               "IS_CALCULABLE_EXPR",
 | |
|               "IS_CONST_EXPR",
 | |
|               "CNT_CONST",
 | |
|               "CNT_FUNC",
 | |
|               "CNT_CALCULABLE_EXPR"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|             ],
 | |
|             "expr_levels": [
 | |
|             ],
 | |
|             "func":"cast",
 | |
|             "children": [
 | |
|                {
 | |
|                 "item_type":"T_VARCHAR",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"VARCHAR",
 | |
|                     "collation":"utf8mb4_general_ci",
 | |
|                     "coercibility":"COERCIBLE"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":4,
 | |
|                     "precision":1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "VARCHAR":"test",
 | |
|                   "collation":"utf8mb4_general_ci"
 | |
|                 }
 | |
|               },
 | |
|                {
 | |
|                 "item_type":"T_INT",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"BIGINT",
 | |
|                     "collation":"binary",
 | |
|                     "coercibility":"NUMERIC"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":-1,
 | |
|                     "precision":-1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "BIGINT":21477785622
 | |
|                 }
 | |
|               }
 | |
|             ],
 | |
|             "enum_set_values": [
 | |
|             ]
 | |
|           },
 | |
|           "idx":0
 | |
|         },
 | |
|          {
 | |
|           "expression": {
 | |
|             "item_type":"T_FUN_SYS_CAST",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"VARCHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":5,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":0,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_CONST",
 | |
|               "IS_FUNC",
 | |
|               "IS_CALCULABLE_EXPR",
 | |
|               "IS_CONST_EXPR",
 | |
|               "CNT_CONST",
 | |
|               "CNT_FUNC",
 | |
|               "CNT_CALCULABLE_EXPR"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|             ],
 | |
|             "expr_levels": [
 | |
|             ],
 | |
|             "func":"cast",
 | |
|             "children": [
 | |
|                {
 | |
|                 "item_type":"T_VARCHAR",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"VARCHAR",
 | |
|                     "collation":"utf8mb4_general_ci",
 | |
|                     "coercibility":"COERCIBLE"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":5,
 | |
|                     "precision":1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "VARCHAR":"test2",
 | |
|                   "collation":"utf8mb4_general_ci"
 | |
|                 }
 | |
|               },
 | |
|                {
 | |
|                 "item_type":"T_INT",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"BIGINT",
 | |
|                     "collation":"binary",
 | |
|                     "coercibility":"NUMERIC"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":-1,
 | |
|                     "precision":-1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "BIGINT":21477785622
 | |
|                 }
 | |
|               }
 | |
|             ],
 | |
|             "enum_set_values": [
 | |
|             ]
 | |
|           },
 | |
|           "idx":1
 | |
|         }
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "right_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_QUESTIONMARK",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"VARCHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":5,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":0,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_CONST",
 | |
|             "IS_STATIC_PARAM",
 | |
|             "CNT_CONST",
 | |
|             "CNT_STATIC_PARAM",
 | |
|             "IS_DYNAMIC_PARAM"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|           ],
 | |
|           "value": {
 | |
|             "UNKNOWN":1
 | |
|           }
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"test2",
 | |
|         "expr_name":"test2",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|     ],
 | |
|     "limit":null,
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":-1,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":false,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":2,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|          {
 | |
|           "expression": {
 | |
|             "item_type":"T_FUN_SYS_CAST",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"VARCHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":5,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":0,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_CONST",
 | |
|               "IS_FUNC",
 | |
|               "IS_CALCULABLE_EXPR",
 | |
|               "IS_CONST_EXPR",
 | |
|               "CNT_CONST",
 | |
|               "CNT_FUNC",
 | |
|               "CNT_CALCULABLE_EXPR"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|             ],
 | |
|             "expr_levels": [
 | |
|             ],
 | |
|             "func":"cast",
 | |
|             "children": [
 | |
|                {
 | |
|                 "item_type":"T_VARCHAR",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"VARCHAR",
 | |
|                     "collation":"utf8mb4_general_ci",
 | |
|                     "coercibility":"COERCIBLE"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":4,
 | |
|                     "precision":1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "VARCHAR":"test",
 | |
|                   "collation":"utf8mb4_general_ci"
 | |
|                 }
 | |
|               },
 | |
|                {
 | |
|                 "item_type":"T_INT",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"BIGINT",
 | |
|                     "collation":"binary",
 | |
|                     "coercibility":"NUMERIC"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":-1,
 | |
|                     "precision":-1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "BIGINT":21477785622
 | |
|                 }
 | |
|               }
 | |
|             ],
 | |
|             "enum_set_values": [
 | |
|             ]
 | |
|           },
 | |
|           "idx":0
 | |
|         },
 | |
|          {
 | |
|           "expression": {
 | |
|             "item_type":"T_FUN_SYS_CAST",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"VARCHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":5,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":0,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_CONST",
 | |
|               "IS_FUNC",
 | |
|               "IS_CALCULABLE_EXPR",
 | |
|               "IS_CONST_EXPR",
 | |
|               "CNT_CONST",
 | |
|               "CNT_FUNC",
 | |
|               "CNT_CALCULABLE_EXPR"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|             ],
 | |
|             "expr_levels": [
 | |
|             ],
 | |
|             "func":"cast",
 | |
|             "children": [
 | |
|                {
 | |
|                 "item_type":"T_VARCHAR",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"VARCHAR",
 | |
|                     "collation":"utf8mb4_general_ci",
 | |
|                     "coercibility":"COERCIBLE"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":5,
 | |
|                     "precision":1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "VARCHAR":"test2",
 | |
|                   "collation":"utf8mb4_general_ci"
 | |
|                 }
 | |
|               },
 | |
|                {
 | |
|                 "item_type":"T_INT",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"BIGINT",
 | |
|                     "collation":"binary",
 | |
|                     "coercibility":"NUMERIC"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":-1,
 | |
|                     "precision":-1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "BIGINT":21477785622
 | |
|                 }
 | |
|               }
 | |
|             ],
 | |
|             "enum_set_values": [
 | |
|             ]
 | |
|           },
 | |
|           "idx":1
 | |
|         }
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "order_by": [
 | |
|   ],
 | |
|   "limit":null,
 | |
|   "select": [
 | |
|      {
 | |
|       "expression": {
 | |
|         "item_type":"T_OP_UNION",
 | |
|         "result_type": {
 | |
|           "meta": {
 | |
|             "type":"VARCHAR",
 | |
|             "collation":"utf8mb4_general_ci",
 | |
|             "coercibility":"COERCIBLE"
 | |
|           },
 | |
|           "accuracy": {
 | |
|             "length":5,
 | |
|             "precision":-1,
 | |
|             "scale":-1
 | |
|           },
 | |
|           "flag":0,
 | |
|           "calc_type": {
 | |
|             "type":"NULL",
 | |
|             "collation":"invalid_type",
 | |
|             "coercibility":"INVALID"
 | |
|           }
 | |
|         },
 | |
|         "expr_info": [
 | |
|           "IS_SET_OP",
 | |
|           "CNT_SET_OP"
 | |
|         ],
 | |
|         "rel_id": [
 | |
|         ],
 | |
|         "expr_level":0,
 | |
|         "expr_levels": [
 | |
|           0
 | |
|         ],
 | |
|         "children": [
 | |
|            {
 | |
|             "item_type":"T_FUN_SYS_CAST",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"VARCHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":5,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":0,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_CONST",
 | |
|               "IS_FUNC",
 | |
|               "IS_CALCULABLE_EXPR",
 | |
|               "IS_CONST_EXPR",
 | |
|               "CNT_CONST",
 | |
|               "CNT_FUNC",
 | |
|               "CNT_CALCULABLE_EXPR"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|             ],
 | |
|             "expr_levels": [
 | |
|             ],
 | |
|             "func":"cast",
 | |
|             "children": [
 | |
|                {
 | |
|                 "item_type":"T_VARCHAR",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"VARCHAR",
 | |
|                     "collation":"utf8mb4_general_ci",
 | |
|                     "coercibility":"COERCIBLE"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":4,
 | |
|                     "precision":1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "VARCHAR":"test",
 | |
|                   "collation":"utf8mb4_general_ci"
 | |
|                 }
 | |
|               },
 | |
|                {
 | |
|                 "item_type":"T_INT",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"BIGINT",
 | |
|                     "collation":"binary",
 | |
|                     "coercibility":"NUMERIC"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":-1,
 | |
|                     "precision":-1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "BIGINT":21477785622
 | |
|                 }
 | |
|               }
 | |
|             ],
 | |
|             "enum_set_values": [
 | |
|             ]
 | |
|           },
 | |
|            {
 | |
|             "item_type":"T_FUN_SYS_CAST",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"VARCHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":5,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":0,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_CONST",
 | |
|               "IS_FUNC",
 | |
|               "IS_CALCULABLE_EXPR",
 | |
|               "IS_CONST_EXPR",
 | |
|               "CNT_CONST",
 | |
|               "CNT_FUNC",
 | |
|               "CNT_CALCULABLE_EXPR"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|             ],
 | |
|             "expr_levels": [
 | |
|             ],
 | |
|             "func":"cast",
 | |
|             "children": [
 | |
|                {
 | |
|                 "item_type":"T_VARCHAR",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"VARCHAR",
 | |
|                     "collation":"utf8mb4_general_ci",
 | |
|                     "coercibility":"COERCIBLE"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":5,
 | |
|                     "precision":1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "VARCHAR":"test2",
 | |
|                   "collation":"utf8mb4_general_ci"
 | |
|                 }
 | |
|               },
 | |
|                {
 | |
|                 "item_type":"T_INT",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"BIGINT",
 | |
|                     "collation":"binary",
 | |
|                     "coercibility":"NUMERIC"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":-1,
 | |
|                     "precision":-1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "BIGINT":21477785622
 | |
|                 }
 | |
|               }
 | |
|             ],
 | |
|             "enum_set_values": [
 | |
|             ]
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "is_alias":true,
 | |
|       "alias_name":"test",
 | |
|       "expr_name":"test",
 | |
|       "default": {
 | |
|         "NULL":"NULL"
 | |
|       }
 | |
|     }
 | |
|   ]
 | |
| }
 | |
| ***************   Case 21   ***************
 | |
| select a from t1 union select a from t1 order by a+1;
 | |
| ***************   Case 22   ***************
 | |
| select/*+query_timeout(1000)*/ 'test' union select/*+query_timeout(1000)*/ 'test2';
 | |
| {
 | |
|   "set_op":1,
 | |
|   "distinct":true,
 | |
|   "left_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_QUESTIONMARK",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"VARCHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":5,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":0,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_CONST",
 | |
|             "IS_STATIC_PARAM",
 | |
|             "CNT_CONST",
 | |
|             "CNT_STATIC_PARAM",
 | |
|             "IS_DYNAMIC_PARAM"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|           ],
 | |
|           "value": {
 | |
|             "UNKNOWN":0
 | |
|           }
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"test",
 | |
|         "expr_name":"test",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|     ],
 | |
|     "limit":null,
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":1000,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":true,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":2,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|          {
 | |
|           "expression": {
 | |
|             "item_type":"T_FUN_SYS_CAST",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"VARCHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":5,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":0,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_CONST",
 | |
|               "IS_FUNC",
 | |
|               "IS_CALCULABLE_EXPR",
 | |
|               "IS_CONST_EXPR",
 | |
|               "CNT_CONST",
 | |
|               "CNT_FUNC",
 | |
|               "CNT_CALCULABLE_EXPR"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|             ],
 | |
|             "expr_levels": [
 | |
|             ],
 | |
|             "func":"cast",
 | |
|             "children": [
 | |
|                {
 | |
|                 "item_type":"T_VARCHAR",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"VARCHAR",
 | |
|                     "collation":"utf8mb4_general_ci",
 | |
|                     "coercibility":"COERCIBLE"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":4,
 | |
|                     "precision":1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "VARCHAR":"test",
 | |
|                   "collation":"utf8mb4_general_ci"
 | |
|                 }
 | |
|               },
 | |
|                {
 | |
|                 "item_type":"T_INT",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"BIGINT",
 | |
|                     "collation":"binary",
 | |
|                     "coercibility":"NUMERIC"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":-1,
 | |
|                     "precision":-1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "BIGINT":21477785622
 | |
|                 }
 | |
|               }
 | |
|             ],
 | |
|             "enum_set_values": [
 | |
|             ]
 | |
|           },
 | |
|           "idx":0
 | |
|         },
 | |
|          {
 | |
|           "expression": {
 | |
|             "item_type":"T_FUN_SYS_CAST",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"VARCHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":5,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":0,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_CONST",
 | |
|               "IS_FUNC",
 | |
|               "IS_CALCULABLE_EXPR",
 | |
|               "IS_CONST_EXPR",
 | |
|               "CNT_CONST",
 | |
|               "CNT_FUNC",
 | |
|               "CNT_CALCULABLE_EXPR"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|             ],
 | |
|             "expr_levels": [
 | |
|             ],
 | |
|             "func":"cast",
 | |
|             "children": [
 | |
|                {
 | |
|                 "item_type":"T_VARCHAR",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"VARCHAR",
 | |
|                     "collation":"utf8mb4_general_ci",
 | |
|                     "coercibility":"COERCIBLE"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":5,
 | |
|                     "precision":1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "VARCHAR":"test2",
 | |
|                   "collation":"utf8mb4_general_ci"
 | |
|                 }
 | |
|               },
 | |
|                {
 | |
|                 "item_type":"T_INT",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"BIGINT",
 | |
|                     "collation":"binary",
 | |
|                     "coercibility":"NUMERIC"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":-1,
 | |
|                     "precision":-1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "BIGINT":21477785622
 | |
|                 }
 | |
|               }
 | |
|             ],
 | |
|             "enum_set_values": [
 | |
|             ]
 | |
|           },
 | |
|           "idx":1
 | |
|         }
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "right_query": {
 | |
|     "stmt_type":1,
 | |
|     "table": [
 | |
|     ],
 | |
|     "joined_table": [
 | |
|     ],
 | |
|     "partition_express": [
 | |
|     ],
 | |
|     "column": [
 | |
|     ],
 | |
|     "select": [
 | |
|        {
 | |
|         "expression": {
 | |
|           "item_type":"T_QUESTIONMARK",
 | |
|           "result_type": {
 | |
|             "meta": {
 | |
|               "type":"VARCHAR",
 | |
|               "collation":"utf8mb4_general_ci",
 | |
|               "coercibility":"IMPLICIT"
 | |
|             },
 | |
|             "accuracy": {
 | |
|               "length":5,
 | |
|               "precision":-1,
 | |
|               "scale":-1
 | |
|             },
 | |
|             "flag":0,
 | |
|             "calc_type": {
 | |
|               "type":"NULL",
 | |
|               "collation":"invalid_type",
 | |
|               "coercibility":"INVALID"
 | |
|             }
 | |
|           },
 | |
|           "expr_info": [
 | |
|             "IS_CONST",
 | |
|             "IS_STATIC_PARAM",
 | |
|             "CNT_CONST",
 | |
|             "CNT_STATIC_PARAM",
 | |
|             "IS_DYNAMIC_PARAM"
 | |
|           ],
 | |
|           "rel_id": [
 | |
|           ],
 | |
|           "value": {
 | |
|             "UNKNOWN":1
 | |
|           }
 | |
|         },
 | |
|         "is_alias":false,
 | |
|         "alias_name":"test2",
 | |
|         "expr_name":"test2",
 | |
|         "default": {
 | |
|           "NULL":"NULL"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "distinct":false,
 | |
|     "rollup":false,
 | |
|     "nocycle":false,
 | |
|     "from": [
 | |
|     ],
 | |
|     "start_with": [
 | |
|     ],
 | |
|     "connect_by": [
 | |
|     ],
 | |
|     "where": [
 | |
|     ],
 | |
|     "group_by": [
 | |
|     ],
 | |
|     "having": [
 | |
|     ],
 | |
|     "aggr_func": [
 | |
|     ],
 | |
|     "order_by": [
 | |
|     ],
 | |
|     "limit":null,
 | |
|     "offset":null,
 | |
|     "show_stmt_ctx": {
 | |
|       "is_from_show_stmt":false,
 | |
|       "global_scope":false,
 | |
|       "tenant_id":-1,
 | |
|       "show_database_id":-1,
 | |
|       "show_table_id":-1,
 | |
|       "grants_user_id":-1
 | |
|     },
 | |
|     "hint": {
 | |
|       "read_static":false,
 | |
|       "no_rewrite":false,
 | |
|       "frozen_version":-1,
 | |
|       "topk_precision":-1,
 | |
|       "sharding_minimum_row_count":0,
 | |
|       "query_timeout":1000,
 | |
|       "hotspot":false,
 | |
|       "index": [
 | |
|       ],
 | |
|       "read_consistency":-1,
 | |
|       "join_ordered":false,
 | |
|       "join_order": [
 | |
|       ],
 | |
|       "merge_hint_ids": [
 | |
|       ],
 | |
|       "hash_hint_ids": [
 | |
|       ],
 | |
|       "no_hash_hint_ids": [
 | |
|       ],
 | |
|       "nl_hint_ids": [
 | |
|       ],
 | |
|       "part_hints": [
 | |
|       ],
 | |
|       "use_late_materialization":-1,
 | |
|       "log_level":"",
 | |
|       "max_concurrent":-1,
 | |
|       "only_concurrent_hint":false,
 | |
|       "has_hint_exclude_concurrent":true,
 | |
|       "parallel":-1,
 | |
|       "use_px":2,
 | |
|       "use join filter":false,
 | |
|       "org_pq_distributes": [
 | |
|       ],
 | |
|       "pq_distributes": [
 | |
|       ]
 | |
|     },
 | |
|     "query_context": {
 | |
|       "param_num":2,
 | |
|       "fetch_cur_time":true,
 | |
|       "calculable_items": [
 | |
|          {
 | |
|           "expression": {
 | |
|             "item_type":"T_FUN_SYS_CAST",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"VARCHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":5,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":0,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_CONST",
 | |
|               "IS_FUNC",
 | |
|               "IS_CALCULABLE_EXPR",
 | |
|               "IS_CONST_EXPR",
 | |
|               "CNT_CONST",
 | |
|               "CNT_FUNC",
 | |
|               "CNT_CALCULABLE_EXPR"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|             ],
 | |
|             "expr_levels": [
 | |
|             ],
 | |
|             "func":"cast",
 | |
|             "children": [
 | |
|                {
 | |
|                 "item_type":"T_VARCHAR",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"VARCHAR",
 | |
|                     "collation":"utf8mb4_general_ci",
 | |
|                     "coercibility":"COERCIBLE"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":4,
 | |
|                     "precision":1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "VARCHAR":"test",
 | |
|                   "collation":"utf8mb4_general_ci"
 | |
|                 }
 | |
|               },
 | |
|                {
 | |
|                 "item_type":"T_INT",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"BIGINT",
 | |
|                     "collation":"binary",
 | |
|                     "coercibility":"NUMERIC"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":-1,
 | |
|                     "precision":-1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "BIGINT":21477785622
 | |
|                 }
 | |
|               }
 | |
|             ],
 | |
|             "enum_set_values": [
 | |
|             ]
 | |
|           },
 | |
|           "idx":0
 | |
|         },
 | |
|          {
 | |
|           "expression": {
 | |
|             "item_type":"T_FUN_SYS_CAST",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"VARCHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":5,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":0,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_CONST",
 | |
|               "IS_FUNC",
 | |
|               "IS_CALCULABLE_EXPR",
 | |
|               "IS_CONST_EXPR",
 | |
|               "CNT_CONST",
 | |
|               "CNT_FUNC",
 | |
|               "CNT_CALCULABLE_EXPR"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|             ],
 | |
|             "expr_levels": [
 | |
|             ],
 | |
|             "func":"cast",
 | |
|             "children": [
 | |
|                {
 | |
|                 "item_type":"T_VARCHAR",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"VARCHAR",
 | |
|                     "collation":"utf8mb4_general_ci",
 | |
|                     "coercibility":"COERCIBLE"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":5,
 | |
|                     "precision":1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "VARCHAR":"test2",
 | |
|                   "collation":"utf8mb4_general_ci"
 | |
|                 }
 | |
|               },
 | |
|                {
 | |
|                 "item_type":"T_INT",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"BIGINT",
 | |
|                     "collation":"binary",
 | |
|                     "coercibility":"NUMERIC"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":-1,
 | |
|                     "precision":-1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "BIGINT":21477785622
 | |
|                 }
 | |
|               }
 | |
|             ],
 | |
|             "enum_set_values": [
 | |
|             ]
 | |
|           },
 | |
|           "idx":1
 | |
|         }
 | |
|       ]
 | |
|     },
 | |
|     "extra_output_exprs": [
 | |
|     ],
 | |
|     "current_level":0,
 | |
|     "equal_sets": [
 | |
|     ],
 | |
|     "pseudo_column_exprs": [
 | |
|     ],
 | |
|     "child_stmts": [
 | |
|     ],
 | |
|     "has_transformed_for_hierarchical_query":false,
 | |
|     "is_hierarchical_query":false
 | |
|   },
 | |
|   "order_by": [
 | |
|   ],
 | |
|   "limit":null,
 | |
|   "select": [
 | |
|      {
 | |
|       "expression": {
 | |
|         "item_type":"T_OP_UNION",
 | |
|         "result_type": {
 | |
|           "meta": {
 | |
|             "type":"VARCHAR",
 | |
|             "collation":"utf8mb4_general_ci",
 | |
|             "coercibility":"COERCIBLE"
 | |
|           },
 | |
|           "accuracy": {
 | |
|             "length":5,
 | |
|             "precision":-1,
 | |
|             "scale":-1
 | |
|           },
 | |
|           "flag":0,
 | |
|           "calc_type": {
 | |
|             "type":"NULL",
 | |
|             "collation":"invalid_type",
 | |
|             "coercibility":"INVALID"
 | |
|           }
 | |
|         },
 | |
|         "expr_info": [
 | |
|           "IS_SET_OP",
 | |
|           "CNT_SET_OP"
 | |
|         ],
 | |
|         "rel_id": [
 | |
|         ],
 | |
|         "expr_level":0,
 | |
|         "expr_levels": [
 | |
|           0
 | |
|         ],
 | |
|         "children": [
 | |
|            {
 | |
|             "item_type":"T_FUN_SYS_CAST",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"VARCHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":5,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":0,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_CONST",
 | |
|               "IS_FUNC",
 | |
|               "IS_CALCULABLE_EXPR",
 | |
|               "IS_CONST_EXPR",
 | |
|               "CNT_CONST",
 | |
|               "CNT_FUNC",
 | |
|               "CNT_CALCULABLE_EXPR"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|             ],
 | |
|             "expr_levels": [
 | |
|             ],
 | |
|             "func":"cast",
 | |
|             "children": [
 | |
|                {
 | |
|                 "item_type":"T_VARCHAR",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"VARCHAR",
 | |
|                     "collation":"utf8mb4_general_ci",
 | |
|                     "coercibility":"COERCIBLE"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":4,
 | |
|                     "precision":1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "VARCHAR":"test",
 | |
|                   "collation":"utf8mb4_general_ci"
 | |
|                 }
 | |
|               },
 | |
|                {
 | |
|                 "item_type":"T_INT",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"BIGINT",
 | |
|                     "collation":"binary",
 | |
|                     "coercibility":"NUMERIC"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":-1,
 | |
|                     "precision":-1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "BIGINT":21477785622
 | |
|                 }
 | |
|               }
 | |
|             ],
 | |
|             "enum_set_values": [
 | |
|             ]
 | |
|           },
 | |
|            {
 | |
|             "item_type":"T_FUN_SYS_CAST",
 | |
|             "result_type": {
 | |
|               "meta": {
 | |
|                 "type":"VARCHAR",
 | |
|                 "collation":"utf8mb4_general_ci",
 | |
|                 "coercibility":"IMPLICIT"
 | |
|               },
 | |
|               "accuracy": {
 | |
|                 "length":5,
 | |
|                 "precision":-1,
 | |
|                 "scale":-1
 | |
|               },
 | |
|               "flag":0,
 | |
|               "calc_type": {
 | |
|                 "type":"NULL",
 | |
|                 "collation":"invalid_type",
 | |
|                 "coercibility":"INVALID"
 | |
|               }
 | |
|             },
 | |
|             "expr_info": [
 | |
|               "IS_CONST",
 | |
|               "IS_FUNC",
 | |
|               "IS_CALCULABLE_EXPR",
 | |
|               "IS_CONST_EXPR",
 | |
|               "CNT_CONST",
 | |
|               "CNT_FUNC",
 | |
|               "CNT_CALCULABLE_EXPR"
 | |
|             ],
 | |
|             "rel_id": [
 | |
|             ],
 | |
|             "expr_levels": [
 | |
|             ],
 | |
|             "func":"cast",
 | |
|             "children": [
 | |
|                {
 | |
|                 "item_type":"T_VARCHAR",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"VARCHAR",
 | |
|                     "collation":"utf8mb4_general_ci",
 | |
|                     "coercibility":"COERCIBLE"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":5,
 | |
|                     "precision":1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "VARCHAR":"test2",
 | |
|                   "collation":"utf8mb4_general_ci"
 | |
|                 }
 | |
|               },
 | |
|                {
 | |
|                 "item_type":"T_INT",
 | |
|                 "result_type": {
 | |
|                   "meta": {
 | |
|                     "type":"BIGINT",
 | |
|                     "collation":"binary",
 | |
|                     "coercibility":"NUMERIC"
 | |
|                   },
 | |
|                   "accuracy": {
 | |
|                     "length":-1,
 | |
|                     "precision":-1,
 | |
|                     "scale":-1
 | |
|                   },
 | |
|                   "flag":1,
 | |
|                   "calc_type": {
 | |
|                     "type":"NULL",
 | |
|                     "collation":"invalid_type",
 | |
|                     "coercibility":"INVALID"
 | |
|                   }
 | |
|                 },
 | |
|                 "expr_info": [
 | |
|                   "IS_CONST",
 | |
|                   "CNT_CONST"
 | |
|                 ],
 | |
|                 "rel_id": [
 | |
|                 ],
 | |
|                 "value": {
 | |
|                   "BIGINT":21477785622
 | |
|                 }
 | |
|               }
 | |
|             ],
 | |
|             "enum_set_values": [
 | |
|             ]
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "is_alias":true,
 | |
|       "alias_name":"test",
 | |
|       "expr_name":"test",
 | |
|       "default": {
 | |
|         "NULL":"NULL"
 | |
|       }
 | |
|     }
 | |
|   ]
 | |
| }
 | |
| ***************   Case 23   ***************
 | |
| drop table t1,t2;
 | |
| {
 | |
|   "stmt_type":21,
 | |
|   "drop_table_arg": {
 | |
|     "tenant_id":1,
 | |
|     "table_type":3,
 | |
|     "tables": [
 | |
|        {
 | |
|         "database_name":"db_set",
 | |
|         "table_name":"t1"
 | |
|       },
 | |
|        {
 | |
|         "database_name":"db_set",
 | |
|         "table_name":"t2"
 | |
|       }
 | |
|     ],
 | |
|     "if_exist":false,
 | |
|     "to_recyclebin":false,
 | |
|     "session_id":-1,
 | |
|     "sess_create_time":0
 | |
|   }
 | |
| }
 | |
| ***************   Case 24   ***************
 | |
| drop database db_set;
 | |
| {
 | |
|   "drop_database_arg":"tenant_id",
 | |
|   "database_name":"db_set",
 | |
|   "if_exist":false,
 | |
|   "to_recyclebin":false
 | |
| }
 | 
