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();
> Ok, I don't mind using a stable hash. Is there one in specific you would re
I traced this through the current flow. I think we can keep the fix small.

A Funnel is not needed here. Guava can hash the string directly:

```java
Hashing.murmur3_128()
    .hashString(tts.toSql(), StandardCharsets.UTF_8)
    .toString()
```

`TimeTravelSpec.toSql()` already includes the kind and the AS OF expression. I 
would use that instead of `Expr.toString()`, since `Expr.toString()` contains 
debug and analyzed state. Murmur3 128 is already used in Impala, and I would 
keep the full hash rather than truncate it.

One shared helper for the `_tt_...` suffix should be enough. Use it in 
`ImpalaSnapshotSqlNode`, and build the schema key in `populateCalciteSchema()` 
before calling `tts.analyze()`. The same `TimeTravelSpec` object is carried 
between those points, so no extra wrapper or Funnel is needed.

I checked the test-only alternative as well. This string is also the schema 
deduplication key and becomes the qualified table name used by self-join 
identity checks. Ignoring it in test output would hide the instability without 
fixing that identity.

I would be comfortable approving this small version. Making different 
expressions that resolve to the same snapshot share an identity can remain a 
follow-up.



--
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 23:53:40 +0000
Gerrit-HasComments: Yes

Reply via email to