dbaliafroozeh commented on a change in pull request #32030:
URL: https://github.com/apache/spark/pull/32030#discussion_r609889192



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/trees/TreeNode.scala
##########
@@ -246,11 +246,50 @@ abstract class TreeNode[BaseType <: TreeNode[BaseType]] 
extends Product {
     arr
   }
 
+  private def childrenTheSame(
+      originalChildren: IndexedSeq[BaseType], newChildren: 
IndexedSeq[BaseType]): Boolean = {
+    val size = originalChildren.size
+    var i = 0
+    var childrenTheSame = true
+    while (i < size && childrenTheSame) {

Review comment:
       And also `break` in Scala doesn't translate to Java break, throws an 
exception and is expensive.




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



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

Reply via email to