[Fix](array-type) support CTAS for ARRAY column from collect_list and collect_set (#13627)

Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
This commit is contained in:
camby
2022-10-26 19:42:15 +08:00
committed by GitHub
parent c5559877b4
commit bed759b3f5
3 changed files with 13 additions and 0 deletions

View File

@ -1082,6 +1082,11 @@ public class FunctionCallExpr extends Expr {
throw new AnalysisException(getFunctionNotFoundError(collectChildReturnTypes()));
}
if (fnName.getFunction().equalsIgnoreCase("collect_list")
|| fnName.getFunction().equalsIgnoreCase("collect_set")) {
fn.setReturnType(new ArrayType(getChild(0).type));
}
applyAutoTypeConversionForDatetimeV2();
if (fnName.getFunction().equalsIgnoreCase("from_unixtime")