[GitHub] [spark] maryannxue commented on a change in pull request #29593: [SPARK-32753][SQL] Do not override when copying tags

2020-09-03 Thread GitBox


maryannxue commented on a change in pull request #29593:
URL: https://github.com/apache/spark/pull/29593#discussion_r483147875



##
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/trees/TreeNode.scala
##
@@ -91,7 +91,11 @@ abstract class TreeNode[BaseType <: TreeNode[BaseType]] 
extends Product {
   private val tags: mutable.Map[TreeNodeTag[_], Any] = mutable.Map.empty
 
   protected def copyTagsFrom(other: BaseType): Unit = {

Review comment:
   Agree with @cloud-fan 's reasoning and proposed fix.
   
   The only worry is that we're not 100% sure if we are breaking things 
somewhere else, but the tests don't say so yet. Can't think of an approach that 
would have less impact yet fix this problem perfectly. Let's go with this 
approach then.





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:
us...@infra.apache.org



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



[GitHub] [spark] maryannxue commented on a change in pull request #29593: [SPARK-32753][SQL] Do not override when copying tags

2020-09-02 Thread GitBox


maryannxue commented on a change in pull request #29593:
URL: https://github.com/apache/spark/pull/29593#discussion_r481756127



##
File path: 
sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala
##
@@ -1205,4 +1205,13 @@ class AdaptiveQueryExecSuite
   })
 }
   }
+
+  test("SPARK-32753: Do not override when copying tags") {
+withSQLConf(
+  SQLConf.ADAPTIVE_EXECUTION_ENABLED.key -> "true"
+) {
+  spark.range(10).union(spark.range(10)).createOrReplaceTempView("v1")
+  runAdaptiveAndVerifyResult("SELECT id FROM v1 GROUP BY id DISTRIBUTE BY 
id")

Review comment:
   we can also check the plan here to make sure the repartition did get 
removed.





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:
us...@infra.apache.org



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