[bug](map-type)fix some bugs in map and map element function (#18935)
fix some bugs in map and map element function.
This commit is contained in:
@ -1461,6 +1461,13 @@ public class FunctionCallExpr extends Expr {
|
||||
fn.getReturnType().getPrimitiveType().setTimeType();
|
||||
}
|
||||
|
||||
if (fnName.getFunction().equalsIgnoreCase("map")) {
|
||||
if ((children.size() & 1) == 1) {
|
||||
throw new AnalysisException("map can't be odd parameters, need even parameters: "
|
||||
+ this.toSql());
|
||||
}
|
||||
}
|
||||
|
||||
if (fnName.getFunction().equalsIgnoreCase("named_struct")) {
|
||||
if ((children.size() & 1) == 1) {
|
||||
throw new AnalysisException("named_struct can't be odd parameters, need even parameters: "
|
||||
|
||||
Reference in New Issue
Block a user