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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to