feat: explain insert select
This commit is contained in:
parent
677a27a097
commit
4b4468e392
|
@ -517,6 +517,7 @@ cmd ::= RESET QUERY CACHE.
|
|||
|
||||
/************************************************ explain *************************************************************/
|
||||
cmd ::= EXPLAIN analyze_opt(A) explain_options(B) query_or_subquery(C). { pCxt->pRootNode = createExplainStmt(pCxt, A, B, C); }
|
||||
cmd ::= EXPLAIN analyze_opt(A) explain_options(B) insert_query(C). { pCxt->pRootNode = createExplainStmt(pCxt, A, B, C); }
|
||||
|
||||
%type analyze_opt { bool }
|
||||
%destructor analyze_opt { }
|
||||
|
@ -599,9 +600,11 @@ cmd ::= DELETE FROM full_table_name(A) where_clause_opt(B).
|
|||
cmd ::= query_or_subquery(A). { pCxt->pRootNode = A; }
|
||||
|
||||
/************************************************ insert **************************************************************/
|
||||
cmd ::= INSERT INTO full_table_name(A)
|
||||
NK_LP col_name_list(B) NK_RP query_or_subquery(C). { pCxt->pRootNode = createInsertStmt(pCxt, A, B, C); }
|
||||
cmd ::= INSERT INTO full_table_name(A) query_or_subquery(B). { pCxt->pRootNode = createInsertStmt(pCxt, A, NULL, B); }
|
||||
cmd ::= insert_query(A). { pCxt->pRootNode = A; }
|
||||
|
||||
insert_query(A) ::= INSERT INTO full_table_name(D)
|
||||
NK_LP col_name_list(B) NK_RP query_or_subquery(C). { A = createInsertStmt(pCxt, D, B, C); }
|
||||
insert_query(A) ::= INSERT INTO full_table_name(C) query_or_subquery(B). { A = createInsertStmt(pCxt, C, NULL, B); }
|
||||
|
||||
/************************************************ literal *************************************************************/
|
||||
literal(A) ::= NK_INTEGER(B). { A = createRawExprNode(pCxt, &B, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &B)); }
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -234,7 +234,7 @@ int32_t schBuildTaskRalation(SSchJob *pJob, SHashObj *planToTask) {
|
|||
}
|
||||
|
||||
SSchTask *pTask = taosArrayGet(pLevel->subTasks, 0);
|
||||
if (SUBPLAN_TYPE_MODIFY != pTask->plan->subplanType) {
|
||||
if (SUBPLAN_TYPE_MODIFY != pTask->plan->subplanType || EXPLAIN_MODE_DISABLE != pJob->attr.explainMode) {
|
||||
pJob->attr.needFetch = true;
|
||||
}
|
||||
}
|
||||
|
@ -484,7 +484,7 @@ int32_t schProcessOnJobFailure(SSchJob *pJob, int32_t errCode) {
|
|||
if (TSDB_CODE_SCH_IGNORE_ERROR == errCode) {
|
||||
return TSDB_CODE_SCH_IGNORE_ERROR;
|
||||
}
|
||||
|
||||
|
||||
schUpdateJobErrCode(pJob, errCode);
|
||||
|
||||
int32_t code = atomic_load_32(&pJob->errCode);
|
||||
|
|
Loading…
Reference in New Issue