smaheshwar-pltr commented on code in PR #14373:
URL: https://github.com/apache/iceberg/pull/14373#discussion_r2539505154


##########
flink/v2.0/flink/src/test/java/org/apache/iceberg/flink/source/TestFlinkTableSource.java:
##########
@@ -501,20 +501,23 @@ public void testFilterPushDownLike() {
         .as("Should contain the push down filter")
         .asString()
         .isEqualTo(expectedScan);
+
+    // endsWith
+    expectedFilter = "ref(name=\"data\") endsWith \"\"g\"\"";
+    sqlLike = "SELECT * FROM " + TABLE_NAME + " WHERE data LIKE '%%g' ";
+    resultLike = sql(sqlLike);
+    assertThat(resultLike).hasSize(1).first().isEqualTo(Row.of(1, "iceberg", 
10.0));
+    assertThat(lastScanEvent.filter())
+        .as("Should contain the push down filter")
+        .asString()
+        .isEqualTo(expectedFilter);
   }
 
   @TestTemplate
   public void testFilterNotPushDownLike() {
     Row expectRecord = Row.of(1, "iceberg", 10.0);
-    String sqlNoPushDown = "SELECT * FROM " + TABLE_NAME + " WHERE data LIKE 
'%%i' ";

Review Comment:
   This `endsWith` filter can now be pushed down. It's therefore moved to the 
above test, and this one starts with a contains `LIKE` filter



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