viirya commented on code in PR #324:
URL: https://github.com/apache/datafusion-comet/pull/324#discussion_r1580058269


##########
spark/src/main/scala/org/apache/spark/sql/comet/execution/shuffle/CometShuffleExchangeExec.scala:
##########
@@ -192,6 +195,21 @@ case class CometShuffleExchangeExec(
 
   override protected def withNewChildInternal(newChild: SparkPlan): 
CometShuffleExchangeExec =
     copy(child = newChild)
+
+  override def equals(obj: Any): Boolean = {
+    obj match {
+      case other: CometShuffleExchangeExec =>
+        this.outputPartitioning == other.outputPartitioning &&
+        this.shuffleOrigin == other.shuffleOrigin && this.child == other.child 
&&
+        this.shuffleType == other.shuffleType &&
+        this.advisoryPartitionSize == other.advisoryPartitionSize
+      case _ =>
+        false
+    }
+  }

Review Comment:
   Because `CometShuffleExchangeExec` adds `originalPlan` parameter which is 
not covered by canonicalization in Spark, we need to exclude it when compare 
two `CometShuffleExchangeExec` to make sure Spark reuse shuffle rule work.



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to