partition by (c1,c2) return compile error, current is 4016
This commit is contained in:
@ -73,6 +73,7 @@ int ObSQLParser::parse_and_gen_sqlid(void *malloc_pool,
|
|||||||
parse_result->is_dynamic_sql_ = false;
|
parse_result->is_dynamic_sql_ = false;
|
||||||
parse_result->is_batched_multi_enabled_split_ = false;
|
parse_result->is_batched_multi_enabled_split_ = false;
|
||||||
parse_result->may_bool_value_ = false;
|
parse_result->may_bool_value_ = false;
|
||||||
|
parse_result->is_external_table_ = false;
|
||||||
|
|
||||||
int64_t new_length = str_len + 1;
|
int64_t new_length = str_len + 1;
|
||||||
char *buf = (char *)parse_malloc(new_length, parse_result->malloc_pool_);
|
char *buf = (char *)parse_malloc(new_length, parse_result->malloc_pool_);
|
||||||
|
|||||||
@ -317,6 +317,7 @@ typedef struct
|
|||||||
uint32_t is_for_remap_ : 1;
|
uint32_t is_for_remap_ : 1;
|
||||||
uint32_t contain_sensitive_data_ : 1;
|
uint32_t contain_sensitive_data_ : 1;
|
||||||
uint32_t may_contain_sensitive_data_ : 1;
|
uint32_t may_contain_sensitive_data_ : 1;
|
||||||
|
uint32_t is_external_table_ : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
ParseNode *result_tree_;
|
ParseNode *result_tree_;
|
||||||
|
|||||||
@ -4624,6 +4624,7 @@ TEMPORARY
|
|||||||
| EXTERNAL
|
| EXTERNAL
|
||||||
{
|
{
|
||||||
result->contain_sensitive_data_ = true;
|
result->contain_sensitive_data_ = true;
|
||||||
|
result->is_external_table_ = true;
|
||||||
malloc_terminal_node($$, result->malloc_pool_, T_EXTERNAL);
|
malloc_terminal_node($$, result->malloc_pool_, T_EXTERNAL);
|
||||||
}
|
}
|
||||||
| /* EMPTY */
|
| /* EMPTY */
|
||||||
@ -6953,12 +6954,17 @@ hash_partition_option
|
|||||||
external_table_partition_option: /* list partition without partition defines*/
|
external_table_partition_option: /* list partition without partition defines*/
|
||||||
PARTITION BY '(' column_name_list ')'
|
PARTITION BY '(' column_name_list ')'
|
||||||
{
|
{
|
||||||
ParseNode *column_names = NULL;
|
if (result->is_external_table_) {
|
||||||
ParseNode *partition_defs = NULL;
|
ParseNode *column_names = NULL;
|
||||||
merge_nodes(column_names, result, T_EXPR_LIST, $4);
|
ParseNode *partition_defs = NULL;
|
||||||
malloc_terminal_node(partition_defs, result->malloc_pool_, T_PARTITION_LIST);
|
merge_nodes(column_names, result, T_EXPR_LIST, $4);
|
||||||
malloc_non_terminal_node($$, result->malloc_pool_, T_LIST_COLUMNS_PARTITION, 5, column_names, partition_defs, NULL, NULL, NULL);
|
malloc_terminal_node(partition_defs, result->malloc_pool_, T_PARTITION_LIST);
|
||||||
dup_expr_string($$, result, @4.first_column, @4.last_column);
|
malloc_non_terminal_node($$, result->malloc_pool_, T_LIST_COLUMNS_PARTITION, 5, column_names, partition_defs, NULL, NULL, NULL);
|
||||||
|
dup_expr_string($$, result, @4.first_column, @4.last_column);
|
||||||
|
} else {
|
||||||
|
yyerror(NULL, result, "paritition by column is not allowed");
|
||||||
|
YYERROR;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user