[FEAT MERGE] add direct load function
Co-authored-by: Monk-Liu <1152761042@qq.com> Co-authored-by: saltonz <saltonzh@gmail.com> Co-authored-by: yongshige <598633031@qq.com>
This commit is contained in:
@ -244,6 +244,16 @@ TRUE {
|
||||
}
|
||||
}
|
||||
|
||||
<hint>TRUE {
|
||||
check_value(yylval);
|
||||
ParseResult *p = (ParseResult *)yyextra;
|
||||
malloc_new_node(yylval->node, p->malloc_pool_, T_BOOL, 0);
|
||||
yylval->node->value_ = 1;
|
||||
COPY_STRING(p->input_sql_ + yylloc->first_column - 1, yyleng, yylval->node->raw_text_);
|
||||
yylval->node->text_len_ = yyleng;
|
||||
return BOOL_VALUE;
|
||||
}
|
||||
|
||||
FALSE {
|
||||
check_value(yylval);
|
||||
ParseResult *p = (ParseResult *)yyextra;
|
||||
@ -258,6 +268,16 @@ FALSE {
|
||||
}
|
||||
}
|
||||
|
||||
<hint>FALSE {
|
||||
check_value(yylval);
|
||||
ParseResult *p = (ParseResult *)yyextra;
|
||||
malloc_new_node(yylval->node, p->malloc_pool_, T_BOOL, 0);
|
||||
yylval->node->value_ = 0;
|
||||
COPY_STRING(p->input_sql_ + yylloc->first_column - 1, yyleng, yylval->node->raw_text_);
|
||||
yylval->node->text_len_ = yyleng;
|
||||
return BOOL_VALUE;
|
||||
}
|
||||
|
||||
{sqbegin} {
|
||||
BEGIN(sq);
|
||||
ParseResult *p = (ParseResult *)yyextra;
|
||||
@ -935,6 +955,8 @@ Timestamp{whitespace}?\"[^\"]*\" {
|
||||
<hint>NO_USE_LATE_MATERIALIZATION { return NO_USE_LATE_MATERIALIZATION; }
|
||||
<hint>TRACE_LOG { return TRACE_LOG; }
|
||||
<hint>LOAD_BATCH_SIZE { return LOAD_BATCH_SIZE; }
|
||||
<hint>DIRECT { return DIRECT; }
|
||||
<hint>APPEND { return APPEND; }
|
||||
<hint>TRACING { return TRACING; }
|
||||
<hint>DOP { return DOP; }
|
||||
<hint>FORCE_REFRESH_LOCATION_CACHE { return FORCE_REFRESH_LOCATION_CACHE; }
|
||||
|
||||
@ -180,6 +180,8 @@ USE_HASH_DISTINCT NO_USE_HASH_DISTINCT
|
||||
DISTINCT_PUSHDOWN NO_DISTINCT_PUSHDOWN
|
||||
USE_HASH_SET NO_USE_HASH_SET
|
||||
USE_DISTRIBUTED_DML NO_USE_DISTRIBUTED_DML
|
||||
// direct load data hint
|
||||
DIRECT
|
||||
// hint related to optimizer statistics
|
||||
APPEND NO_GATHER_OPTIMIZER_STATISTICS GATHER_OPTIMIZER_STATISTICS
|
||||
// other
|
||||
@ -8411,6 +8413,14 @@ READ_CONSISTENCY '(' consistency_level ')'
|
||||
{
|
||||
malloc_non_terminal_node($$, result->malloc_pool_, T_LOAD_BATCH_SIZE, 1, $3);
|
||||
}
|
||||
| DIRECT '(' BOOL_VALUE ',' INTNUM ')'
|
||||
{
|
||||
malloc_non_terminal_node($$, result->malloc_pool_, T_DIRECT, 2, $3, $5);
|
||||
}
|
||||
| APPEND
|
||||
{
|
||||
malloc_terminal_node($$, result->malloc_pool_, T_APPEND);
|
||||
}
|
||||
| ENABLE_PARALLEL_DML
|
||||
{
|
||||
malloc_terminal_node($$, result->malloc_pool_, T_ENABLE_PARALLEL_DML);
|
||||
@ -8427,10 +8437,6 @@ READ_CONSISTENCY '(' consistency_level ')'
|
||||
{
|
||||
malloc_terminal_node($$, result->malloc_pool_, T_NO_COST_BASED_QUERY_TRANSFORMATION);
|
||||
}
|
||||
| APPEND
|
||||
{
|
||||
malloc_terminal_node($$, result->malloc_pool_, T_APPEND);
|
||||
}
|
||||
| NO_GATHER_OPTIMIZER_STATISTICS
|
||||
{
|
||||
malloc_terminal_node($$, result->malloc_pool_, T_NO_GATHER_OPTIMIZER_STATISTICS);
|
||||
|
||||
Reference in New Issue
Block a user