Represent scan snapshots explicitly instead of parsing table names - #19
Merged
Merged
Conversation
ila
marked this pull request as ready for review
September 21, 2026 14:40
This was referenced Sep 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for reviewing.
Why
LPTS currently appends
AT (...)to a table-name string and later reparses that string to render a snapshot. This confuses identifiers with SQL: an ordinary table namedevents AT (VERSION => 2)is incorrectly treated as a time-travel scan.OpenIVM also needs to restore foreign snapshot metadata after binding against local schema-only tables. Doing that in a separate AST walk duplicates traversal and relies on the same string convention.
Change
AtClauseseparately on scan AST/CTE nodes; render it in DuckDB or Spark syntax at serialization time.LogicalPlanToAst, invoked during its existing GET visit with the original catalog entry, before output-name remapping affects identity. Native DuckLake snapshot metadata takes precedence.Production code is 49 lines smaller; tests add 78 lines. No new settings, additional plan walk, or handwritten SQL parser.
Validation
lpts_checkbag-equality validation of the quoted-name regression.make testDuckDB corpus gate: all 3,346 files completed, no new WRONG or FAIL against baseline.EXCEPT ALL. Broader OpenIVM suite passed 10,577 assertions across 88 cases; one ICU-dependent case was skipped by that runner.The OpenIVM consumer update is being prepared separately on ila/openivm#10; it removes the duplicate input scanner and uses this resolver during the existing LPTS traversal. Some text-only OpenIVM refresh paths still retain their existing restoration scanner; this LPTS change does not claim to eliminate those paths.