xy720 commented on code in PR #16444: URL: https://github.com/apache/doris/pull/16444#discussion_r1099762582
########## fe/fe-core/src/main/java/org/apache/doris/analysis/CastExpr.java: ########## @@ -319,9 +319,22 @@ public void analyze() throws AnalysisException { type, Function.NullableMode.ALWAYS_NULLABLE, Lists.newArrayList(Type.VARCHAR), false, "doris::CastFunctions::cast_to_array_val", null, null, true); + } else if (type.isMapType()) { + fn = ScalarFunction.createBuiltin(getFnName(Type.MAP), + type, Function.NullableMode.ALWAYS_NULLABLE, + Lists.newArrayList(Type.VARCHAR), false, + "doris::CastFunctions::cast_to_map_val", null, null, true); + } else if (type.isStructType()) { + fn = ScalarFunction.createBuiltin(getFnName(Type.STRUCT), + type, Function.NullableMode.ALWAYS_NULLABLE, + Lists.newArrayList(Type.VARCHAR), false, + "doris::CastFunctions::cast_to_struct_val", null, null, true); } if (fn == null) { + if (type.isStructType() && childType.isStringType()) { Review Comment: This check is for json load and cast function. Here I add a todo comment to check map type. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org