Github user yhuai commented on a diff in the pull request:
https://github.com/apache/spark/pull/9276#discussion_r43719283
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/Exchange.scala ---
@@ -209,6 +299,98 @@ private[sql] case class EnsureRequirements(sqlContext:
SQLContext) extends Rule[
}
}
+ /**
+ * Adds [[ExchangeCoordinator]] to [[Exchange]]s if adaptive query
execution is enabled
+ * and partitioning schemes of these [[Exchange]]s support
[[ExchangeCoordinator]].
+ */
+ private def withExchangeCoordinator(
+ children: Seq[SparkPlan],
+ requiredChildDistributions: Seq[Distribution]): Seq[SparkPlan] = {
+ val supportsCoordinator =
+ if (children.exists(_.isInstanceOf[Exchange])) {
+ // Right now, ExchangeCoordinator only support HashPartitionings.
+ children.forall {
+ case e @ Exchange(hash: HashPartitioning, _, _) => true
+ case child =>
+ child.outputPartitioning match {
+ case hash: HashPartitioning => true
+ case collection: PartitioningCollection =>
+
collection.partitionings.exists(_.isInstanceOf[HashPartitioning])
--- End diff --
That will not happen. I will change it to `forall`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]