Fokko commented on code in PR #7109:
URL: https://github.com/apache/iceberg/pull/7109#discussion_r1169853525
##########
flink/v1.17/flink/src/test/java/org/apache/iceberg/flink/source/TestFlinkScan.java:
##########
@@ -433,6 +433,24 @@ public void testFilterExp() throws Exception {
TestFixtures.SCHEMA);
}
+ @Test
+ public void testFilterExp() throws Exception {
+ Table table =
+ catalogResource.catalog().createTable(TestFixtures.TABLE_IDENTIFIER,
TestFixtures.SCHEMA);
+
+ List<Record> expectedRecords =
RandomGenericData.generate(TestFixtures.SCHEMA, 3, 0L);
+ expectedRecords.get(0).set(2, "a");
+ expectedRecords.get(1).set(2, "b");
+ expectedRecords.get(2).set(2, "c");
+
+ GenericAppenderHelper helper = new GenericAppenderHelper(table,
fileFormat, TEMPORARY_FOLDER);
+ DataFile dataFile = helper.writeFile(expectedRecords);
+ helper.appendToTable(dataFile);
+ List<Row> actual =
+ runWithFilter(Expressions.greaterThanOrEqual("data", "b"), "where
data>='b'");
+ TestHelpers.assertRecords(actual, expectedRecords, TestFixtures.SCHEMA);
Review Comment:
You are correct! The code was working, but the test wasn't good. Fixed it!
--
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]