You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/09/11 07:31:54 UTC

[GitHub] [spark] peter-toth commented on pull request #37851: [SPARK-40362][SQL] Fix BinaryComparison canonicalization

peter-toth commented on PR #37851:
URL: https://github.com/apache/spark/pull/37851#issuecomment-1242907318

   The benchmark:
   ```
     test("benchmark") {
       val col = Literal(true)
       var and = And(col, col)
       var i = 0
       while (i < 2000) {
         and = And(and, col)
         i += 1
       }
       and.canonicalized
     }
   ```
   is fine, 140ms on my machine. That's because we don't alter the bottom-up traversal, just at the `BinaryComparison` nodes we can swap the already ordered children.


-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org