dongjoon-hyun commented on PR #60645: URL: https://github.com/apache/spark/pull/60645#issuecomment-6968650469
Thank you for the review. **PR description**: I updated the user-facing section. An insert-only MERGE with a single `WHEN NOT MATCHED` clause filters the source before the anti join, so this PR does not change it. I also replaced "at most once per row" because an operand repeated across calls is now computed once per call, and the "What changes" section states it. **Operand repeated across calls**: I'd like to keep the code as it is, without a TODO. - `MergeRowsExec` does not share a repeated expression across the condition and the outputs of an instruction, or across instructions, whether or not `With` is involved. For example, `WHEN MATCHED AND trim(s.v) <> '' THEN UPDATE SET v = trim(s.v)` already computes `trim(s.v)` twice per updated row on master. The operands of `NULLIF` and `BETWEEN` were shared on master only as a side effect of the `Project` under `MergeRows`, which is what this PR removes. - `RewriteWithExpression` already makes the same trade-off for `CASE`, `IF`, and the other conditional expressions. Sharing them would need subexpression elimination in `MergeRowsExec` for every repeated expression, not only for `With`. So a TODO in `RewriteWithExpression` would point to the wrong place. -- 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]
