alamb commented on issue #19905:
URL: https://github.com/apache/datafusion/issues/19905#issuecomment-7219122737

   This came up several times recently, for example with @Kristofferjoha here
   - https://github.com/apache/datafusion/pull/26669#discussion_r4700908297
   
   > 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?
   
   
   I don't fully understand the nuance, but it seems like something good to 
sort out holistically for the 57 release as 
https://github.com/apache/datafusion/pull/26669 looks like a bit of a partial 
fix -- it made the code more complicated and fixed some cases but since it 
didn't address the underlying cause we aren't in great shape
   
   Aotherwise we'll be chasing corner cases like
   - https://github.com/apache/datafusion/pull/27453


-- 
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]

Reply via email to