[fix](planner) ctas should not clone queryStmt after parse (#19114)

Remove redundant clone in the constructor of CTAS stmt

Error message:

```
NullPointerException, msg: java.lang.NullPointerException: null
```
This commit is contained in:
AKIRA
2023-04-27 21:09:11 +09:00
committed by GitHub
parent 8288494e8e
commit 7cf1ffa0b4
2 changed files with 1 additions and 6 deletions

View File

@ -51,7 +51,7 @@ public class CreateTableAsSelectStmt extends DdlStmt {
this.createTableStmt = createTableStmt;
this.columnNames = columnNames;
this.queryStmt = queryStmt;
this.insertStmt = new InsertStmt(createTableStmt.getDbTbl(), queryStmt.clone());
this.insertStmt = new InsertStmt(createTableStmt.getDbTbl(), queryStmt);
}
/**

View File

@ -1655,11 +1655,6 @@ public class FunctionCallExpr extends Expr {
}
// rewrite return type if is nested type function
analyzeNestedFunction();
for (OrderByElement o : orderByElements) {
if (!o.getExpr().isAnalyzed) {
o.getExpr().analyzeImpl(analyzer);
}
}
}
// if return type is nested type, need to be determined the sub-element type