You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/06/04 18:21:21 UTC

[GitHub] [spark] juliuszsompolski commented on a change in pull request #28729: [SPARK-30808][SQL] Enable Java 8 time API in Thrift server

juliuszsompolski commented on a change in pull request #28729:
URL: https://github.com/apache/spark/pull/28729#discussion_r435458068



##########
File path: sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkOperation.scala
##########
@@ -73,7 +73,7 @@ private[hive] trait SparkOperation extends Operation with Logging {
           sqlContext.sparkContext.setLocalProperty(SparkContext.SPARK_SCHEDULER_POOL, pool)
         case None =>
       }
-
+      sqlContext.sparkContext.setLocalProperty(SQLConf.DATETIME_JAVA8API_ENABLED.key, "true")

Review comment:
       I think this needs to be set in sqlContext.sparkSession.conf, not as sqlContext.sparkContext.setLocalProperty.
   ...
   actually, an even better place to set it would be here in openSession, to just set it once per session. https://github.com/apache/spark/blob/master/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLSessionManager.scala#L65




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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