Kristofferjoha commented on code in PR #26669: URL: https://github.com/apache/datafusion/pull/26669#discussion_r4700908297
########## datafusion/physical-plan/src/execution_plan.rs: ########## @@ -1998,7 +1998,9 @@ pub fn check_not_null_constraints( /// /// While this function enables plan reuse, it does not allow the same plan to be executed if it (OR): /// -/// * uses dynamic filters, +/// * uses dynamic filters and the original plan (or another reset copy) is still Review Comment: I have looked into this a bit more. I think your suggestion to separate recursive iteration reset from independent plan reuse makes sense. The part I missed is that `DataSourceExec::reset_state` keeps the underlying source, so giving the copied join a fresh filter would still leave the Parquet scan reading the original one. For independent reuse, I’m thinking we could use expression id to rebind the producer and its consumers when we instantiate the plan, along the lines of what is done in `MaterializedCteBinder`. I’d be happy to try that with HashJoin and Parquet first. Is that the direction you had in mind, or would you prefer to move the filter state out of the plan entirely? -- 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]
