[fix](planner)ctas's query part is not analyzed correctly (#24111)
* [fix](planner)ctas's query part is not analyzed correctly
This commit is contained in:
@ -108,4 +108,10 @@ public class CreateTableAsSelectStmt extends DdlStmt {
|
||||
ErrorReport.reportAnalysisException(ErrorCode.ERR_COL_NUMBER_NOT_MATCH);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset() {
|
||||
super.reset();
|
||||
queryStmt.reset();
|
||||
}
|
||||
}
|
||||
|
||||
@ -785,6 +785,7 @@ public abstract class QueryStmt extends StatementBase implements Queriable {
|
||||
sortInfo = (other.sortInfo != null) ? other.sortInfo.clone() : null;
|
||||
analyzer = other.analyzer;
|
||||
evaluateOrderBy = other.evaluateOrderBy;
|
||||
disableTuplesMVRewriter = other.disableTuplesMVRewriter;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -1164,6 +1164,10 @@ public class StmtExecutor {
|
||||
if (parsedStmt instanceof InsertStmt) {
|
||||
((InsertStmt) parsedStmt).getQueryStmt().resetSelectList();
|
||||
}
|
||||
|
||||
if (parsedStmt instanceof CreateTableAsSelectStmt) {
|
||||
((CreateTableAsSelectStmt) parsedStmt).getQueryStmt().resetSelectList();
|
||||
}
|
||||
}
|
||||
|
||||
// Because this is called by other thread
|
||||
|
||||
Reference in New Issue
Block a user