JingsongLi commented on code in PR #11004:
URL: https://github.com/apache/paimon/pull/11004#discussion_r4522983369
##########
paimon-common/src/main/java/org/apache/paimon/predicate/LeafPredicateExtractor.java:
##########
@@ -30,11 +29,11 @@ public class LeafPredicateExtractor implements
PredicateVisitor<Map<String, Leaf
@Override
public Map<String, LeafPredicate> visit(LeafPredicate predicate) {
- Optional<FieldRef> fieldRefOptional = predicate.fieldRefOptional();
- if (!fieldRefOptional.isPresent()) {
- throw new UnsupportedOperationException();
- }
- return Collections.singletonMap(fieldRefOptional.get().name(),
predicate);
+ // A leaf on a transform such as UPPER(name) does not constrain the
field itself.
+ return predicate
+ .fieldRefOptional()
+ .map(fieldRef -> Collections.singletonMap(fieldRef.name(),
predicate))
+ .orElse(Collections.emptyMap());
Review Comment:
**[P2] Preserve the filter contract for consumers and other ID-only readers**
I added a real-table Java SDK check on `257ad7527`. With consumer IDs `id1`
and `id2`, I called `newRead().executeFilter()` with `UPPER(consumer_id) =
'ID1'` and got both IDs. This change turns the prior explicit
unsupported-transform failure into silently wrong SDK results. Spark retaining
a residual does not help callers using this SDK entry point. Could we retain
and evaluate transformed residuals in `ConsumersRead` and the other ID-only
readers, or keep the explicit unsupported error for readers that cannot
evaluate them? The plain Java String `IN` case can retain its existing ID
pushdown path.
--
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]