[fix](planner) NPE when use ctas to create table (#18973)

This is caused by expr in orderbyelements is not analyzed.
This commit is contained in:
AKIRA
2023-04-26 15:12:28 +09:00
committed by GitHub
parent 7a786c3b09
commit 50d9f35f63
2 changed files with 39 additions and 0 deletions

View File

@ -1630,6 +1630,11 @@ 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