Skip to content

[WIP][SPARK-57421][SQL][CONNECT] Support @-syntax version and timestamp time travel on table names#56481

Open
sotikoug83 wants to merge 1 commit into
apache:masterfrom
sotikoug83:SPARK-57421-at-syntax-time-travel
Open

[WIP][SPARK-57421][SQL][CONNECT] Support @-syntax version and timestamp time travel on table names#56481
sotikoug83 wants to merge 1 commit into
apache:masterfrom
sotikoug83:SPARK-57421-at-syntax-time-travel

Conversation

@sotikoug83

@sotikoug83 sotikoug83 commented Jun 12, 2026

Copy link
Copy Markdown

What changes were proposed in this pull request?

Add the "@" time-travel shorthand on table names so that

SELECT * FROM name@vN
SELECT * FROM name@<TS>

and

spark.read.format("delta").table("name@vN")
spark.read.format("delta").table("name@<ts>")

parse into the same plan as the existing VERSION AS OF / TIMESTAMP AS OF and option("versionAsOf") / option("timestampAsOf") clauses. Support for SQL, the classic DataFrame reader, and Spark Connect.

Why are the changes needed?

Spark has AS OF and the versionAsOf/timestampAsOf reader 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 conf which allows time travel, no longer gives a parse error.

How was this patch tested?

New tests in PlanParserSuite, parseTemporalTableIdentifier, DataSourceV2SQLSuite, and SparkConnectPlannerSuite.

Was this patch authored or co-authored using generative AI tooling?

With help from Claude :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant