Fokko commented on code in PR #7109: URL: https://github.com/apache/iceberg/pull/7109#discussion_r1164141140
########## flink/v1.17/flink/src/test/java/org/apache/iceberg/flink/source/TestFlinkInputFormat.java: ########## @@ -140,6 +148,90 @@ public void testBasicProjection() throws IOException { TestHelpers.assertRows(result, expected); } + @Test + public void testBasicFormatFiltering() throws IOException { + Schema writeSchema = new Schema(Types.NestedField.required(0, "id", Types.LongType.get())); + + Table sourceTable = + catalogResource.catalog().createTable(TableIdentifier.of("default", "t"), writeSchema); + + List<Record> writeRecords = RandomGenericData.generate(writeSchema, 22, 0L); + new GenericAppenderHelper(sourceTable, fileFormat, TEMPORARY_FOLDER) + .appendToTable(writeRecords); + + List<Row> result = + runFormat( + FlinkSource.forRowData() + .tableLoader(tableLoader()) + .filters(Collections.singletonList(Expressions.greaterThanOrEqual("id", 0))) + .buildFormat()); + + List<Row> expected = + Lists.newArrayList( + Row.of(170168523965373507L), + Row.of(236240913033168047L), + Row.of(6146794652083548235L), + Row.of(5072005423257391728L), + Row.of(171134583860878546L), + Row.of(8730854458729406051L), + Row.of(6688467811848818630L), + Row.of(428667830982598836L), + Row.of(9223372036854775807L), + Row.of(4922475540349336432L), + Row.of(7138230367502298321L), + Row.of(6787954838522539928L), + Row.of(9223372036854775807L), + Row.of(2440897930508784356L), + Row.of(282712201594543727L)); + + TestHelpers.assertRows(result, expected); + } + + @Test + public void testBasicRowDataFiltering() throws Exception { Review Comment: I've added a test in `TestFlinkScan ` that filters on a not-partitioned column -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org