You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "peter-toth (via GitHub)" <gi...@apache.org> on 2023/03/18 08:38:49 UTC

[GitHub] [spark] peter-toth commented on pull request #40473: [SPARK-42851][SQL] Guard EquivalentExpressions.addExpr() with supportedExpression()

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

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