viirya commented on a change in pull request #29794:
URL: https://github.com/apache/spark/pull/29794#discussion_r495598613
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Canonicalize.scala
##########
@@ -80,6 +80,13 @@ object Canonicalize {
orderCommutative(a, { case And(l, r) if l.deterministic &&
r.deterministic => Seq(l, r)})
.reduce(And)
+ case o: BitwiseOr =>
+ orderCommutative(o, { case BitwiseOr(l, r) => Seq(l, r)
}).reduce(BitwiseOr)
Review comment:
Canonicalized expression is only used for determining if two expressions
have same result. We don't run it directly. And we usually consider
`deterministic` together when using `canonicalized`, e.g. `semanticEquals`.
----------------------------------------------------------------
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]