db-scnakandala commented on PR #39722:
URL: https://github.com/apache/spark/pull/39722#issuecomment-1423248966

   > > @peter-toth Can you elaborate more on the statement "shouldn't 
canonicalize a single expression to MultiCommutativeOp"
   > > From what I understand since the operator is a commutative expression, 
it should at least have two operands (?)
   > 
   > I would keep the canonicalization of a single commutative expression like: 
`Add(x, y)` as it is: `Add(x, y)`, but when we have at least 2 nested: 
`Add(Add(x, y), z)` then as `MultiCommutativeOp(x, y, z, Add)`
   
   If I understand it correctly, setting the threshold to `3` should achieve 
this requirement, right?


-- 
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: [email protected]

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