sundapeng commented on PR #9434:
URL: https://github.com/apache/paimon/pull/9434#issuecomment-5447316616

   Closing this. I went back and checked where an always-false partition 
predicate can actually come from, and it cannot reach `FormatTableScan` today.
   
   - The only producers of `PartitionPredicate.ALWAYS_FALSE` are 
`ManifestFileBlockMerger`, `ManifestFileLegacyMerger` and `ManifestFileSorter`. 
None of them scans a format table.
   - On the Spark side an always-false filter becomes 
`PredicateBuilder.alwaysFalse()`, a `LeafPredicate` over `NullTransform` with 
no `FieldRef`. `PartitionPredicateVisitor.visit` returns false for it, so 
`PaimonBaseScanBuilder` files it as a data filter and it never becomes a 
partition filter.
   - `FormatReadBuilder.withPartitionFilter` builds its predicate through 
`createPartitionPredicate`, never the singleton.
   
   So the short-circuit never runs, and `readResolve` was added only to keep 
the reference check alive across serialization. Recognizing always-false by 
structure instead of by identity would not help either, because the predicate 
does not arrive on the partition filter path at all. Reaching it would mean 
changing how `PartitionPredicateVisitor` classifies a predicate with no field 
reference, which affects every table type and is a separate discussion.
   
   I will bring this back if a caller shows up. Sorry for the noise.
   


-- 
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]

Reply via email to