Zoltan Borok-Nagy has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/23793 )

Change subject: IMPALA-14092 Part3: Enable predicate pushdown for paimon table.
......................................................................


Patch Set 7:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/23793/7/fe/src/main/java/org/apache/impala/planner/paimon/ImpalaExprConverter.java
File fe/src/main/java/org/apache/impala/planner/paimon/ImpalaExprConverter.java:

http://gerrit.cloudera.org:8080/#/c/23793/7/fe/src/main/java/org/apache/impala/planner/paimon/ImpalaExprConverter.java@176
PS7, Line 176:           if (literal_value.indexOf("%") == 
literal_value.length() - 1) {
             :             String candidate = literal_value.substring(0, 
literal_value.length() - 1);
             :             if (!candidate.isEmpty()) {
             :               return builder.startsWith(index, 
BinaryString.fromString(candidate));
             :             }
Even if we have string_col LIKE 'asdf%xyz', we could push down 
startsWith(index, BinaryString.fromString("asdf"));

Same goes for underscore _, i.e. we could just always push down the 
non-wildcard prefix of the string.


http://gerrit.cloudera.org:8080/#/c/23793/7/fe/src/main/java/org/apache/impala/planner/paimon/ImpalaExprConverter.java@182
PS7, Line 182:             String candidate = literal_value.substring(1);
             :             if (!candidate.isEmpty()) {
             :               return builder.endsWith(index, 
BinaryString.fromString(candidate));
             :             }
Even if we have string_col LIKE 'asdf%xyz', we could push down endsWith(index, 
BinaryString.fromString("xyz"));

Moreover, we could push down both:

* startsWith(index, BinaryString.fromString("asdf"));
* endsWith(index, BinaryString.fromString("xyz"));


http://gerrit.cloudera.org:8080/#/c/23793/4/fe/src/main/java/org/apache/impala/planner/paimon/PredicateExtractor.java
File fe/src/main/java/org/apache/impala/planner/paimon/PredicateExtractor.java:

http://gerrit.cloudera.org:8080/#/c/23793/4/fe/src/main/java/org/apache/impala/planner/paimon/PredicateExtractor.java@90
PS4, Line 90: prs.isEmpty()) { return n
> the exprs in pushedExprs_ includes expressions can be pushed down to Java P
Thanks for the explanation! I think the current code is fine!



--
To view, visit http://gerrit.cloudera.org:8080/23793
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iee07fa35de8381121a20b2976d6424626d705483
Gerrit-Change-Number: 23793
Gerrit-PatchSet: 7
Gerrit-Owner: ji chen <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Riza Suminto <[email protected]>
Gerrit-Reviewer: Steve Carlin <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>
Gerrit-Reviewer: ji chen <[email protected]>
Gerrit-Comment-Date: Wed, 11 Feb 2026 16:56:27 +0000
Gerrit-HasComments: Yes

Reply via email to