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/02/12 23:12:08 UTC

[GitHub] [spark] hvanhovell commented on a change in pull request #27387: [SPARK-30798][SQL] Scope Session.active in QueryExecution

hvanhovell commented on a change in pull request #27387: [SPARK-30798][SQL] Scope Session.active in QueryExecution
URL: https://github.com/apache/spark/pull/27387#discussion_r378566832
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala
 ##########
 @@ -503,7 +503,9 @@ class Dataset[T] private[sql](
    * @group basic
    * @since 1.6.0
    */
-  def schema: StructType = queryExecution.analyzed.schema
+  def schema: StructType = sparkSession.withActive {
+    queryExecution.analyzed.schema
 
 Review comment:
   Unfortunately it does. We were seeing errors in one of the thrift suites, the behavior of some expressions depends on SQLConf.get. In this particular case `IntegralDivide` is the offender. This is actually super bad since it can lead to correctness problems, and we should fix this in more a complete way.

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


With regards,
Apache Git Services

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