Kristofferjoha opened a new pull request, #26669: URL: https://github.com/apache/datafusion/pull/26669
## Which issue does this PR close? Closes #26641. ## Rationale for this change Hash joins inside recursive CTEs read every probe-side row on each iteration because their dynamic filters stop updating the scan. This prevents pruning during recursive queries such as graph walks. ## What changes are included in this PR? - Reset the existing shared dynamic filter instead of dropping it. - Clear the build accumulator for each execution. - Update prepared-build test callers to propagate reset errors. - Add a recursive join regression test in cte.slt. Depends on #26056 for `DynamicFilterPhysicalExpr::reset()`. It hasnt been merged yet, however it has been approved, so i tought i was safe to use its implementation. ## What is the testing strategy for this PR? The new cte.slt case checks that the recursive query returns 1–5 and that the probe scan outputs 4 rows and prunes 396 rows across four iterations. ## Are there any user-facing changes? The public `HashJoinExecBuilder::reset_state` method now returns `Result<Self>;` callers must handle the result. -- 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]
