You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "LiaCastaneda (via GitHub)" <gi...@apache.org> on 2025/09/11 16:36:25 UTC

[I] Support for where x in (...) dynamic filters in hash join [datafusion]

LiaCastaneda opened a new issue, #17523:
URL: https://github.com/apache/datafusion/issues/17523

   ### Is your feature request related to a problem or challenge?
   
   Currently, DataFusion only supports bounds dynamic filters, which work well when the data sources have metadata or are sorted (e.g., Parquet). However, for unsorted data sources, we would benefit from supporting list-based dynamic filters.
   
   The idea is to take the build side values, collect them into a List, and then convert that list into a predicate (similar to an IN clause).
   
   
   ### Describe the solution you'd like
   
   For example if we have the following query:
   ```
   SELECT *
   FROM fact_table f
   JOIN dim_table d
     ON f.key = d.key
   WHERE d.region = 'US';
   ```
   
   With list dynamic filter, we could collect the f.key values into a List and push down a predicate like:
   
   `d.key IN (1, 42, 77, 103, ...)`
   
   into the probe side.
   
   I understand we should put a limit on how big this List can get, maybe make this configurable by the users though an option and use a safe default limit.
   
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


-- 
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: github-unsubscribe@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] Support for where x in (...) dynamic filters in hash join [datafusion]

Posted by "LiaCastaneda (via GitHub)" <gi...@apache.org>.
LiaCastaneda closed issue #17523: Support for where x in (...) dynamic filters in hash join
URL: https://github.com/apache/datafusion/issues/17523


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] Support for where x in (...) dynamic filters in hash join [datafusion]

Posted by "LiaCastaneda (via GitHub)" <gi...@apache.org>.
LiaCastaneda commented on issue #17523:
URL: https://github.com/apache/datafusion/issues/17523#issuecomment-3283953332

   Ah didn't see that one, I will close this one


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] Support for where x in (...) dynamic filters in hash join [datafusion]

Posted by "rkrishn7 (via GitHub)" <gi...@apache.org>.
rkrishn7 commented on issue #17523:
URL: https://github.com/apache/datafusion/issues/17523#issuecomment-3282943112

   This is likely related to https://github.com/apache/datafusion/issues/17171#issuecomment-3282832934!
   
   The discussion there is around passing the build side hash table to the probe side for row filtering. Though I do think there is also benefit to pushing down an expression like an `IN LIST` that can be used for stats-based filtering (e.g. to filter out entire row groups). 
   
   > I understand we should put a limit on how big this List can get, maybe make this configurable by the users though an option and use a safe default limit.
   
   Yeah I did a bit of testing around this and things get pretty slow if the list is large. Not sure what a good default would be, but I imagine something pretty small 🤔 . I think it can work well when we have a very small build side


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] Support for where x in (...) dynamic filters in hash join [datafusion]

Posted by "adriangb (via GitHub)" <gi...@apache.org>.
adriangb commented on issue #17523:
URL: https://github.com/apache/datafusion/issues/17523#issuecomment-3283567409

   Let's continue discussion in https://github.com/apache/datafusion/issues/17171 and close this issue if that's okay with you @LiaCastaneda ?


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org