cloud-fan commented on a change in pull request #33188:
URL: https://github.com/apache/spark/pull/33188#discussion_r663005381



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala
##########
@@ -1526,8 +1526,8 @@ class AdaptiveQueryExecSuite
         val dfRepartitionWithNum = df.repartition(5, 'b)
         dfRepartitionWithNum.collect()
         val planWithNum = dfRepartitionWithNum.queryExecution.executedPlan
-        // The top shuffle from repartition is optimized out.
-        assert(!hasRepartitionShuffle(planWithNum))
+        // The top shuffle from repartition is not optimized out.

Review comment:
       Ideally, when we optimize out the user-specified repartition (with num 
partitions), we should mark the operator that produces the same output 
partitioning as "not optimizable", so that we don't break the semantic of 
user-specified repartition.
   
   However, this is super complicated and it doesn't seem to be worthwhile to 
optimize user-specified repartitions. I'm +1 to just not optimize out 
user-specified repartition in AQE.




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to