You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wenchen Fan (Jira)" <ji...@apache.org> on 2022/11/21 10:23:00 UTC
[jira] [Resolved] (SPARK-41154) Incorrect relation caching for queries with time travel spec
[ https://issues.apache.org/jira/browse/SPARK-41154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wenchen Fan resolved SPARK-41154.
---------------------------------
Fix Version/s: 3.3.2
3.4.0
Resolution: Fixed
Issue resolved by pull request 38687
[https://github.com/apache/spark/pull/38687]
> Incorrect relation caching for queries with time travel spec
> ------------------------------------------------------------
>
> Key: SPARK-41154
> URL: https://issues.apache.org/jira/browse/SPARK-41154
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 3.3.0, 3.3.1
> Reporter: Allison Portis
> Priority: Major
> Fix For: 3.3.2, 3.4.0
>
>
> [https://github.com/apache/spark/pull/34497] added AS OF syntax support to support time travel queries in SQL. When resolving these [we cache the resolved relation|https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala#L1250] with only the qualified table name as the key, ignoring the time travel spec. Thus any subsequent queries on that table are resolved using the first's time travel spec.
> This affects subqueries, CTEs, and temporary views (when created with SQL).
> Queries like this will be incorrectly resolved:
> {code:sql}
> select * from table version as of 1
> union all
> select * from table version as of 0
> {code}
> --->
> {code:sql}
> select * from table version as of 1
> union all
> select * from table version as of 1
> {code}
> This was originally reported here https://github.com/delta-io/delta/issues/1479
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org