[ 
https://issues.apache.org/jira/browse/SPARK-57421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gengliang Wang resolved SPARK-57421.
------------------------------------
    Fix Version/s: 4.3.0
       Resolution: Fixed

Issue resolved by pull request 56481
[https://github.com/apache/spark/pull/56481]

> [WIP] Support @-syntax version and timestamp time travel on table name
> ----------------------------------------------------------------------
>
>                 Key: SPARK-57421
>                 URL: https://issues.apache.org/jira/browse/SPARK-57421
>             Project: Spark
>          Issue Type: New Feature
>          Components: Connect, SQL
>    Affects Versions: 5.0.0
>            Reporter: Sotirios Kougiouris
>            Assignee: Sotirios Kougiouris
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 4.3.0
>
>
> h2. What
> Add the {{@}} time travel shorthand on table names so that
> {code:sql}
> SELECT * FROM name@vN
> SELECT * FROM name@<TS>
> {code}
> and
> {code:java}
> spark.read.format("format").table("name@vN")
> spark.read.format("format").table("name@<ts>")
> {code}
> parse into the same plan as the existing {{VERSION AS OF}} / {{TIMESTAMP AS 
> OF}} and {{option("versionAsOf")}} / {{option("timestampAsOf")}} syntaxes. 
> Support for SQL, the classic DataFrame reader, and Spark Connect.
> h2. Why
> Spark already supports {{VERSION AS OF}} / {{TIMESTAMP 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.
> h2. Proposed change
>  * Lexer/grammar: add {{@}}-suffix on table identifiers.
>  * AstBuilder converts the suffix into {{RelationTimeTravel}}.
>  * New flag {{spark.sql.timeTravel.atSyntax.enabled}} (default {{true}}) to 
> allow or disallow.
> h2. Notes
>  * Backquoted identifiers like {{`name@v1`}} remain literal table names.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to