You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Max Gekk (Jira)" <ji...@apache.org> on 2023/10/09 19:17:00 UTC

[jira] [Resolved] (SPARK-45383) Missing case for RelationTimeTravel in CheckAnalysis

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

Max Gekk resolved SPARK-45383.
------------------------------
    Fix Version/s: 3.5.1
                   4.0.0
       Resolution: Fixed

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

> Missing case for RelationTimeTravel in CheckAnalysis
> ----------------------------------------------------
>
>                 Key: SPARK-45383
>                 URL: https://issues.apache.org/jira/browse/SPARK-45383
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Core
>    Affects Versions: 3.5.0
>            Reporter: Ryan Johnson
>            Assignee: Wenchen Fan
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 3.5.1, 4.0.0
>
>
> {{CheckAnalysis.checkAnalysis0}} lacks a case for {{{}RelationTimeTravel{}}}, and since the latter is (intentionally) an {{UnresolvedLeafNode}} rather than a {{{}UnaryNode{}}}, the existing checks do not traverse it.
> Result: Attempting time travel over a non-existing table produces a spark internal error from the [default case|https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala#L818], rather than the expected {{{}AnalysisException{}}}:
> {code:java}
> [info]   Cause: org.apache.spark.SparkException: [INTERNAL_ERROR] Found the unresolved operator: 'RelationTimeTravel 'UnresolvedRelation [not_exists], [], false, 0
> [info]   at org.apache.spark.SparkException$.internalError(SparkException.scala:77)
> [info]   at org.apache.spark.sql.catalyst.analysis.CheckAnalysis.$anonfun$checkAnalysis0$54(CheckAnalysis.scala:753) {code}
> Fix should be simple enough:
> {code:java}
> case tt: RelationTimeTravel =>
>   checkAnalysis0(tt.table) {code}



--
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