maryannxue commented on a change in pull request #26813: [SPARK-30188][SQL] 
Resolve the failed unit tests when enable AQE
URL: https://github.com/apache/spark/pull/26813#discussion_r371919392
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/InsertAdaptiveSparkPlan.scala
 ##########
 @@ -39,11 +41,26 @@ case class InsertAdaptiveSparkPlan(
 
   private val conf = adaptiveExecutionContext.session.sessionState.conf
 
+  def containShuffle(plan: SparkPlan): Boolean = {
+    plan.find {
+      case _: Exchange => true
+      case s: SparkPlan => !s.requiredChildDistribution.forall(_ == 
UnspecifiedDistribution)
+    }.isDefined
+  }
+
+  def containSubQuery(plan: SparkPlan): Boolean = {
+    plan.find(_.expressions.exists(_.find {
 
 Review comment:
   It is absolutely ridiculous to do so here. We deliberately added 
`SubqueryAdaptiveNotSupportedException` to make sure that it's all-in or 
all-out for the main query and all its subqueries in order to ensure subquery 
reuse 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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to