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 2017/11/12 22:17:00 UTC

[jira] [Updated] (SPARK-22488) The view resolution in the SparkSession internal table() API

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

Wenchen Fan updated SPARK-22488:
--------------------------------
    Fix Version/s: 2.2.1

> The view resolution in the SparkSession internal table() API 
> -------------------------------------------------------------
>
>                 Key: SPARK-22488
>                 URL: https://issues.apache.org/jira/browse/SPARK-22488
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.1.2, 2.2.0
>            Reporter: Xiao Li
>            Assignee: Xiao Li
>             Fix For: 2.2.1, 2.3.0
>
>
> The current internal `table()` API of `SparkSession` bypasses the Analyzer and directly calls `sessionState.catalog.lookupRelation` API. This skips the view resolution logics in our Analyzer rule `ResolveRelations`. This internal API is widely used by various DDL commands or the other internal APIs.
> Users might get the strange error caused by view resolution when the default database is different.
> ```
> Table or view not found: t1; line 1 pos 14
> org.apache.spark.sql.AnalysisException: Table or view not found: t1; line 1 pos 14
> 	at org.apache.spark.sql.catalyst.analysis.package$AnalysisErrorAt.failAnalysis(package.scala:42)
> ```



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org