morrySnow commented on code in PR #36553: URL: https://github.com/apache/doris/pull/36553#discussion_r1648476038
########## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertUtils.java: ########## @@ -161,10 +164,16 @@ public static InternalService.PDataRow getRowStringValue(List<NamedExpression> c row.addColBuilder().setValue(StmtExecutor.NULL_VALUE_FOR_LOAD); } else if (expr instanceof ArrayLiteral) { row.addColBuilder().setValue(String.format("\"%s\"", - ((ArrayLiteral) expr).toLegacyLiteral().getStringValueForArray())); + ((ArrayLiteral) expr).toLegacyLiteral().getStringValueForStreamLoad())); } else { - row.addColBuilder().setValue(String.format("\"%s\"", - ((Literal) expr).toLegacyLiteral().getStringValue())); + String stringValue = ((Literal) expr).toLegacyLiteral().getStringValueForStreamLoad(); + if (stringValue.equals(StmtExecutor.NULL_VALUE_FOR_LOAD) || stringValue.startsWith("\"") + || stringValue.endsWith( + "\"")) { + row.addColBuilder().setValue(String.format("\"%s\"", stringValue)); + } else { + row.addColBuilder().setValue(String.format("%s", stringValue)); Review Comment: could process string literal `abc"dbf` correctly? -- 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