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 tables. ...................................................................... Patch Set 12: (7 comments) Thanks for working on this! http://gerrit.cloudera.org:8080/#/c/23793/12//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/23793/12//COMMIT_MSG@16 PS12, Line 16: re-evaluate pushed conjuncts in Impala post-scan for correctness while Partition predicates are removed from the conjuncts, so they are not pushed and not re-evaluated. http://gerrit.cloudera.org:8080/#/c/23793/12/fe/src/main/java/org/apache/impala/planner/PaimonScanNode.java File fe/src/main/java/org/apache/impala/planner/PaimonScanNode.java: http://gerrit.cloudera.org:8080/#/c/23793/12/fe/src/main/java/org/apache/impala/planner/PaimonScanNode.java@136 PS12, Line 136: if (!extractedPredicates_.getSelectivityConjuncts().isEmpty()) { Nit: when pushdown doesn't apply (non-FileStoreTable) this list is empty, so the conjuncts' selectivity is no longer applied at all. http://gerrit.cloudera.org:8080/#/c/23793/12/fe/src/main/java/org/apache/impala/planner/PaimonScanNode.java@230 PS12, Line 230: getEffectiveReadFilters() Nit: the filters are serialized into every split, but the reader only uses splits_.get(0)'s. Could they be sent once per scan node? http://gerrit.cloudera.org:8080/#/c/23793/12/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/12/fe/src/main/java/org/apache/impala/planner/paimon/ImpalaExprConverter.java@610 PS12, Line 610: v = Date.valueOf(((DateLiteral) value).getStringValue()); nit: java.sql.Date uses the Julian calendar before 1582-10-15: DATE '1582-10-10' is pushed as 1582-10-20. LocalDate.ofEpochDay(getValue()) avoids it. http://gerrit.cloudera.org:8080/#/c/23793/12/fe/src/main/java/org/apache/impala/planner/paimon/ImpalaExprConverter.java@640 PS12, Line 640: case FLOAT: { Paimon compares with Float.compare(): -0.0 = 0 is false (loses rows) and NaN > 1 is true (extra rows on partition columns). Maybe don't push FLOAT/DOUBLE? And do something similar to https://gerrit.cloudera.org/#/c/25192/ in a follow up? http://gerrit.cloudera.org:8080/#/c/23793/12/fe/src/main/java/org/apache/impala/planner/paimon/ImpalaExprConverter.java@695 PS12, Line 695: long micros = ExprUtil.utcTimestampToUnixTimeMicros(analyzer_, literal); Paimon converts the java.sql.Timestamp back to a wall clock in the JVM zone (fromSQLTimestamp), so with TZ=Europe/Budapest '2024-01-01 00:00' is pushed as 01:00, and pruned files/partitions lose rows. Please pass a LocalDateTime built in UTC, and test the converted value under a non-UTC default zone. http://gerrit.cloudera.org:8080/#/c/23793/12/fe/src/main/java/org/apache/impala/planner/paimon/ImpalaExprConverter.java@707 PS12, Line 707: ts.setNanos((int) ((micros % 1000000) * 1000)); Sub-micro digits are truncated: ts < '2024-01-01 00:00:00.0000005' is pushed as ts < '2024-01-01 00:00:00' and drops rows at exactly 00:00:00, and = leaks rows on partition columns. Probably we shouldn't push such literals. -- 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: 12 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: Thu, 29 Oct 2026 13:37:45 +0000 Gerrit-HasComments: Yes
