peter-toth commented on PR #40473:

   Thanks @rednaxelafx for the fix and pinging me.
   I think you are right that `EquivalentExpressions.addExpr()` should be 
guarded by `supportedExpression()` if we guard `getExprState()`. But, I'm not 
sure it is right that we don't deduplicate the `max(transform(array(id), x -> 
x))` in your example query.
   Probably the real issue here is that in`PhysicalAggregation` the class 
`EquivalentExpressions` is used for simply deduplicating whole expressions 
while on executors we use it for common subexpression elimination. In the 
former case we don't need the `LambdaVariable ` guard but in the latter one we 
need it. So maybe we should add a argument to `EquivalentExpressions` to 
enable/disable the guards and in `PhysicalAggregation` we should disable it?

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:

For queries about this service, please contact Infrastructure at:

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to