Aleksandr Efimov has posted comments on this change. ( http://gerrit.cloudera.org:8080/24577 )
Change subject: IMPALA-15178: Calcite Planner: support Iceberg time travel feature. ...................................................................... Patch Set 15: (1 comment) http://gerrit.cloudera.org:8080/#/c/24577/15/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteMetadataHandler.java File java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteMetadataHandler.java: http://gerrit.cloudera.org:8080/#/c/24577/15/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteMetadataHandler.java@152 PS15, Line 152: String timeTravelTableKey = lowerCaseTableName + "_tt_" + tts.hashCode(); TimeTravelSpec doesn't override equals()/hashCode() (nor does StmtNode), so this is the identity hash, and the synthetic name isn't reproducible: the same query text produces a different table key on every compilation. getQualifiedName() puts this string into the RelOptTable qualified name, so it lands in RelNode digests and logical-plan dumps - anything comparing plans textually (debug logs, future plan tests, materialization matching by qualified name) sees a fresh name each run. A second effect: two references to the same table with an equal spec in one query (self-join `t FOR SYSTEM_VERSION AS OF 123 join t FOR SYSTEM_VERSION AS OF 123`) create two distinct spec objects, hence two unrelated Calcite tables, and the containsKey() dedup in addTimeTravelTable() can effectively never fire since equal specs never share a key. Could TimeTravelSpec get equals/hashCode over (kind, asOfVersion, asOfMicros), or the key be derived from the resolved snapshot id / travel timestamp? A deterministic name would also help any external consumer of the logical plan, where stable table identity is part of the contract. -- To view, visit http://gerrit.cloudera.org:8080/24577 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I6ab3466d6c453f8e030763749dd64903b8c41264 Gerrit-Change-Number: 24577 Gerrit-PatchSet: 15 Gerrit-Owner: Steve Carlin <[email protected]> Gerrit-Reviewer: Aleksandr Efimov <[email protected]> Gerrit-Reviewer: Aman Sinha <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Joe McDonnell <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Noemi Pap-Takacs <[email protected]> Gerrit-Reviewer: Peter Rozsa <[email protected]> Gerrit-Reviewer: Steve Carlin <[email protected]> Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]> Gerrit-Comment-Date: Mon, 17 Aug 2026 08:27:45 +0000 Gerrit-HasComments: Yes
