wombatu-kun commented on code in PR #19642:
URL: https://github.com/apache/hudi/pull/19642#discussion_r3794493749
##########
hudi-trino/src/test/java/io/trino/plugin/hudi/TestHudiSmokeTest.java:
##########
@@ -928,6 +937,26 @@ public void
testDynamicFilterEnabledPredicatePushdown(ResourceHudiTablesInitiali
assertQuery(query, "VALUES (1, 'a1', 100.0, 1000), (3, 'a3', 101.0,
1001)");
}
+ @ParameterizedTest
+ @EnumSource(
+ value = ResourceHudiTablesInitializer.TestingTable.class,
+ names = {"HUDI_MULTI_FG_PT_V6_MOR", "HUDI_MULTI_FG_PT_V8_MOR"})
+ public void
testDynamicFilterEliminatesAllSplits(ResourceHudiTablesInitializer.TestingTable
table)
+ {
+ Session session = SessionBuilder
+ .from(getSession())
+ .withDynamicFilterTimeout("10s")
+ .build();
+
+ // The build side matches no rows, so the completed dynamic filter is
NONE and the
+ // probe-side split source must report itself finished instead of
draining the queue
+ @Language("SQL") String query = "SELECT t1.id FROM " +
+ table + " t1 " +
+ "INNER JOIN " + table + " t2 ON t1.id = t2.id " +
+ "WHERE t2.price < 0";
+ assertThat(getQueryRunner().execute(session,
query).getRowCount()).isEqualTo(0);
Review Comment:
`partitionMatchesPredicate` already returns false for every split under a
NONE predicate, so draining and filtering the whole queue also reads `Input: 0
rows` - the signal I pointed at does not separate the two paths either. The
only observable difference is `isFinished()` turning true on the first NONE
batch, which needs a unit test on `HudiSplitSource` rather than a query-level
assertion.
--
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]