zizon commented on PR #50490: URL: https://github.com/apache/spark/pull/50490#issuecomment-3405770302
I come across similar issues. I suspected the root case is in https://github.com/apache/spark/blob/9e14f5f959d4abba4d713a4165d97b59c431123c/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/DynamicPruning.scala#L61 The `withNewPlan` do not update the `buildKeys` which latter used to build joins of the `buildQuery` side. Update paths do not latter resolve such mismatch in a specialize way, but for general `SubqueryExpression`: https://github.com/apache/spark/blob/9e14f5f959d4abba4d713a4165d97b59c431123c/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/ReplaceCTERefWithRepartition.scala#L81-L87 So, I propose to fix as in this [commit](https://github.com/zizon/spark/commit/990ef227b3f6e70bbd0f12b713eeec261b2655da) -- 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]
