puneetdixit200 opened a new pull request, #55985: URL: https://github.com/apache/spark/pull/55985
## What changes were proposed in this pull request? This updates `NormalizeCTEIds` so normalization for the current `WithCTE` scope does not descend into nested `WithCTE` nodes that will be normalized by the normal top-down traversal. This prevents nested CTE refs from being remapped twice when plans contain nested `WithCTE` nodes under a union. A regression test covers the reported temp-view + nested CTE + union pattern and forces `queryExecution.normalized` before checking the result. ## How was this patch tested? - `git diff --check` - `JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home PATH="/opt/homebrew/opt/openjdk@17/bin:$PATH" ./build/sbt "sql/testOnly org.apache.spark.sql.CTEInlineSuiteAEOff -- -z SPARK-56921"` - `JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home PATH="/opt/homebrew/opt/openjdk@17/bin:$PATH" ./build/sbt "sql/testOnly org.apache.spark.sql.CTEInlineSuiteAEOn -- -z SPARK-56921"` -- 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]
