voonhous commented on code in PR #19863:
URL: https://github.com/apache/hudi/pull/19863#discussion_r3956133181
##########
hudi-trino/src/test/java/io/trino/plugin/hudi/TestHudiSplitSource.java:
##########
@@ -68,6 +77,29 @@ public void testNoneDynamicFilterTerminatesSource()
assertThat(splitSource.isFinished()).isTrue();
}
+ @Test
+ public void testNonePredicateYieldsEmptySplitSource()
+ {
+ // A none() predicate must short-circuit before the metastore is
consulted: the split manager would
+ // otherwise hand it to computePartitionKeyFilter, which rejects a
none() domain
Review Comment:
`partitionColumns` is empty here, so `getPartitions` takes the NON_PARTITION
early return and `computePartitionKeyFilter` is never reached. The test still
holds as a control, since `metastoreProvider.apply` runs before the lazy
partition load. Proposed wording:
```diff
public void testNonePredicateYieldsEmptySplitSource()
{
- // A none() predicate must short-circuit before the metastore is
consulted: the split manager would
- // otherwise hand it to computePartitionKeyFilter, which rejects a
none() domain
+ // A none() predicate must short-circuit before the metastore is
consulted. This handle declares no partition
+ // columns, so getPartitions would take its NON_PARTITION early
return rather than reach
+ // computePartitionKeyFilter: what the guard stops here is splits
emitted for a predicate no row can match,
+ // since HudiBackgroundSplitLoader waves NON_PARTITION past
HudiPartitionInfo.doesMatchPredicates.
HudiSplitManager splitManager = new HudiSplitManager(
```
Same question as on the other thread.
--
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]