aokolnychyi commented on code in PR #6524:
URL: https://github.com/apache/iceberg/pull/6524#discussion_r1062917361


##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/Spark3Util.java:
##########
@@ -639,9 +639,9 @@ public <T> String predicate(UnboundPredicate<T> pred) {
         case NOT_EQ:
           return pred.ref().name() + " != " + sqlString(pred.literal());
         case STARTS_WITH:
-          return pred.ref().name() + " LIKE '" + pred.literal() + "%'";
+          return pred.ref().name() + " LIKE '" + pred.literal().value() + "%'";

Review Comment:
   I noticed an issue while comparing string representation of filters in tests.
   Without this fix, it was `dep LIKE '"d1"%'`. Now it is simply `dep LIKE 
'd1%'` and matches Spark.



-- 
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