cloud-fan commented on code in PR #46437: URL: https://github.com/apache/spark/pull/46437#discussion_r1596316349
########## sql/catalyst/src/main/java/org/apache/spark/sql/connector/util/V2ExpressionSQLBuilder.java: ########## @@ -169,7 +171,15 @@ yield visitBinaryArithmetic( } protected String visitLiteral(Literal<?> literal) { - return literal.toString(); + String litString = literal.toString(); + if (literal.dataType() instanceof StringType) { + return "'" + + StringUtils.replace(litString.substring(1, litString.length() - 1), Review Comment: shall we do this change in `LiteralValue.toString`? -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org