xiaokang commented on code in PR #13129: URL: https://github.com/apache/doris/pull/13129#discussion_r990984939
########## fe/fe-core/src/main/java/org/apache/doris/planner/LoadScanNode.java: ########## @@ -206,7 +206,23 @@ protected void finalizeParams(Map<String, SlotDescriptor> slotDescByName, expr = new ArithmeticExpr(ArithmeticExpr.Operator.MULTIPLY, expr, new IntLiteral(-1)); expr.analyze(analyzer); } - expr = castToSlot(destSlotDesc, expr); + + PrimitiveType dstType = destSlotDesc.getType().getPrimitiveType(); + PrimitiveType srcType = expr.getType().getPrimitiveType(); + if (srcType == PrimitiveType.VARCHAR && dstType == PrimitiveType.JSONB) { + List<Expr> args = Lists.newArrayList(); + args.add(expr); + String nullable = "notnull"; + if (destSlotDesc.getIsNullable() || expr.isNullable()) { + nullable = "nullable"; + } + String name = "jsonb_parse_" + nullable + "_error_to_invalid"; + expr = new FunctionCallExpr(name, args); + expr.analyze(analyzer); + System.out.println("xk debug use function " + name + " " + expr); Review Comment: removed -- 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