izchen commented on a change in pull request #3460:
URL: https://github.com/apache/iceberg/pull/3460#discussion_r750613569
##########
File path:
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/Spark3Util.java
##########
@@ -659,17 +658,7 @@ public String or(String leftResult, String rightResult) {
}
private static <T> String
sqlString(List<org.apache.iceberg.expressions.Literal<T>> literals) {
- return
literals.stream().map(DescribeExpressionVisitor::sqlString).collect(Collectors.joining(",
"));
- }
-
- private static String sqlString(org.apache.iceberg.expressions.Literal<?>
lit) {
- if (lit.value() instanceof String) {
- return "'" + lit.value() + "'";
- } else if (lit.value() instanceof ByteBuffer) {
- throw new IllegalArgumentException("Cannot convert bytes to SQL
literal: " + lit);
- } else {
- return lit.value().toString();
- }
+ return
literals.stream().map(Object::toString).collect(Collectors.joining(", "));
Review comment:
Thanks for your review. After testing, I think this is correct
--
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]