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

Cheng Lian commented on SPARK-4037:
-----------------------------------

This is a regression of SPARK-2814, added in SPARK-3729.

One solution is let HiveContext always reuse SessionState started within the 
same thread, if there's none, create a new one. In this way, we don't need to 
override the SessionState field in HiveThriftServer2, thus eliminate this issue.

> NPE in JDBC server when calling SET
> -----------------------------------
>
>                 Key: SPARK-4037
>                 URL: https://issues.apache.org/jira/browse/SPARK-4037
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>            Reporter: Michael Armbrust
>            Assignee: Cheng Lian
>            Priority: Blocker
>
> {code}
> SET spark.sql.shuffle.partitions=10;
> {code}
> {code}
> 14/10/21 18:00:47 ERROR server.SparkSQLOperationManager: Error executing 
> query:
> java.lang.NullPointerException
>       at org.apache.spark.sql.hive.HiveContext.runHive(HiveContext.scala:309)
>       at 
> org.apache.spark.sql.hive.HiveContext.runSqlHive(HiveContext.scala:272)
>       at org.apache.spark.sql.hive.HiveContext.setConf(HiveContext.scala:244)
>       at 
> org.apache.spark.sql.execution.SetCommand.sideEffectResult$lzycompute(commands.scala:64)
> ...
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to