voonhous commented on code in PR #19642:
URL: https://github.com/apache/hudi/pull/19642#discussion_r3794806166
##########
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:
Fair -- both signals are downstream of the same NONE predicate, so neither
separates the branch from drain-and-filter. Added `TestHudiSplitSource` in
b92f718be3f5 via a package-private constructor seam that keeps the production
error-listener wiring: a NONE snapshot returns an empty batch and flips
`isFinished` true while the queue still holds undrained splits (the
discriminating case), plus the loader-failure and normal-completion paths. Kept
the query-level test too: it pins that a real query produces a completed NONE
snapshot at all, which the unit test cannot.
--
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]