sarutak commented on PR #60366: URL: https://github.com/apache/spark/pull/60366#issuecomment-6969149002
As proposed in my comment above, I reworked the PR to keep master's rewrite and evaluate the UDF only for the rows that take the zero-row branch (the `EvalOnlyWhen` marker), instead of pulling the aggregates out. That removes the behavior change and the migration-guide entry, so several of the items below no longer apply; replies to each are inline. In place of the migration-guide entry I added an internal config, `spark.sql.optimizer.decorrelateInnerQuery.evalCountBugUdfConditionally.enabled` (default true); setting it to false restores master's evaluation (the answer to your round-2 legacy-config ask). This also supersedes my earlier replies that described the pull-out (the migration-guide entry and "no legacy config" in 4568976018, keeping the pull-out only for Python UDFs in 4568975645, `pullOutAggregate` in 4568977220, pulling out each aggregate on its own in 4568976526 and 4568976888, the block-comment step in 4568978077, and 4568977638 / 4568978468, and the LEAD comment 686 5631060), and it resolves the conflicts you asked about. The spark-test bot's inline notes are addressed too: its CASE 3 point is covered by the `TODO(SPARK-61660)` above CASE 2 that names CASE 2 and CASE 3 of `constructLeftJoins`, and its nested-nullability note no longer applies since there is no pull-out widening a column's type. -- 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]
