[WIP][SPARK-57421][SQL][CONNECT] Support @-syntax version and timestamp time travel on table names#56481
Open
sotikoug83 wants to merge 1 commit into
Open
Conversation
…me travel on table names
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.
What changes were proposed in this pull request?
Add the "@" time-travel shorthand on table names so that
and
parse into the same plan as the existing
VERSION AS OF/TIMESTAMP AS OFandoption("versionAsOf")/option("timestampAsOf")clauses. Support for SQL, the classic DataFrame reader, and Spark Connect.Why are the changes needed?
Spark has
AS OFand theversionAsOf/timestampAsOfreader options but not the compact @ suffix. Resolving it at parse time also simplifies the time travel entry points pipeline.Does this PR introduce any user-facing change?
Yes, new syntax on table names gated by a
confwhich allows time travel, no longer gives a parse error.How was this patch tested?
New tests in
PlanParserSuite,parseTemporalTableIdentifier,DataSourceV2SQLSuite, andSparkConnectPlannerSuite.Was this patch authored or co-authored using generative AI tooling?
With help from Claude :)