You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2022/04/10 08:45:00 UTC

[jira] [Commented] (SPARK-38845) SparkContext init before SparkSession will cause hive table not found

    [ https://issues.apache.org/jira/browse/SPARK-38845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17520121#comment-17520121 ] 

Apache Spark commented on SPARK-38845:
--------------------------------------

User 'wangshengjie123' has created a pull request for this issue:
https://github.com/apache/spark/pull/36129

> SparkContext init before SparkSession will cause hive table not found
> ---------------------------------------------------------------------
>
>                 Key: SPARK-38845
>                 URL: https://issues.apache.org/jira/browse/SPARK-38845
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.1.2, 3.2.1
>            Reporter: wangshengjie
>            Priority: Major
>
> If we init SparkContext before SparkSession when using DataFrame to query hive table, if will throw table not found exception.
> {code:java}
> //代码占位符
> val sparkContext = new SparkContext()
> val sparkSession = SparkSession
>   .builder
>   .appName("SparkSession Test")
>   .enableHiveSupport()
>   .getOrCreate()
> sparkSession.sql("select * from tableA"){code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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