[
https://issues.apache.org/jira/browse/SPARK-58012?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sotirios Kougiouris updated SPARK-58012:
----------------------------------------
Description:
h2. What
Add the {{@}} timestamp time travel shorthand on table names so that
{code:sql}
SELECT * FROM name@<TS>
{code}
and
{code:java}
spark.read.format("format").table("name@<ts>")
{code}
parse into the same plan as the existing {{TIMESTAMP AS OF}} and
{{option("timestampAsOf")}} syntaxes. Support for SQL, the DataFrame reader,
and Spark Connect.
h2. Why
Spark already supports {{TIMESTAMP AS OF}} and the {{{}timestampAsOf{}}} reader
option, 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 for timestamps on table identifiers.
h2. Notes
* Backquoted identifiers like {{`name@<ts>`}} remain literal table names.
was:
h2. What
Add the {{@}} timestamp time travel shorthand on table names so that
{code:sql}
SELECT * FROM name@<TS>
{code}
and
{code:java}
spark.read.format("format").table("name@<ts>")
{code}
parse into the same plan as the existing {{TIMESTAMP AS OF}} and
{{option("timestampAsOf")}} syntaxes. Support for SQL, the classic DataFrame
reader, and Spark Connect.
h2. Why
Spark already supports {{TIMESTAMP AS OF}} and the {{{}timestampAsOf{}}} reader
option, 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 for timestamps on table identifiers.
h2. Notes
* Backquoted identifiers like {{`name@<ts>`}} remain literal table names.
> Support @-syntax timestamp time travel on table name
> ----------------------------------------------------
>
> Key: SPARK-58012
> URL: https://issues.apache.org/jira/browse/SPARK-58012
> Project: Spark
> Issue Type: Sub-task
> Components: Connect, SQL
> Affects Versions: 4.3.0
> Reporter: Sotirios Kougiouris
> Assignee: Sotirios Kougiouris
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.3.0
>
>
> h2. What
> Add the {{@}} timestamp time travel shorthand on table names so that
> {code:sql}
> SELECT * FROM name@<TS>
> {code}
> and
> {code:java}
> spark.read.format("format").table("name@<ts>")
> {code}
> parse into the same plan as the existing {{TIMESTAMP AS OF}} and
> {{option("timestampAsOf")}} syntaxes. Support for SQL, the DataFrame reader,
> and Spark Connect.
> h2. Why
> Spark already supports {{TIMESTAMP AS OF}} and the {{{}timestampAsOf{}}}
> reader option, 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 for timestamps on table identifiers.
> h2. Notes
> * Backquoted identifiers like {{`name@<ts>`}} 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]