xumingming commented on PR #58229: URL: https://github.com/apache/spark/pull/58229#issuecomment-6877522827
Thanks for the thorough reviews, @cloud-fan, @peter-toth, @spark-test and @uros-b! 1. Grouping by a correlated scalar subquery now works: all occurrences of one identifier are rewritten to a single shared reference shape. 2. Views that evaluate `input_file_name()` / `input_file_block_*` are no longer converted, so the file context never crosses the per-site shuffle. 3. Conversion is skipped entirely when exchange reuse is disabled, since the CTE would be recomputed per reference. 4. Occurrences with divergent bodies, hints, or effective SQL configs are rejected, so reference sites no longer inherit the first occurrence's hints. 5. Views over unseeded `TABLESAMPLE` are rejected; per-reference sampling no longer collapses into one shared sample. 6. New tests pin that CTE id normalization keeps differently wired bodies apart, covering re-minted and recursive inner CTE ids. 7. The end-to-end plan assertions now descend into subquery plans and pin the reused exchange to the CTE's round-robin repartition, so they can fail. 8. Rule, test, and config comments were rewritten to match behavior, including where the rule runs and what each test pins. 9. The config doc now states the costs up front: a shuffle of the view's output per reference, and per-reference pushdown, dynamic partition pruning and scalar-subquery merging no longer reaching the body — so conversion can make queries the base branch already evaluates without repeated work slower, and that trade is the user's to make. -- 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]
