alamb commented on issue #9405:
URL: 
https://github.com/apache/arrow-datafusion/issues/9405#issuecomment-1974771388

   > I'm gonna reopen this because I think we should at the very least enhance 
the documentation for supports_filters_pushdown, and maybe even introduce a 
runtime check somewhere to catch this behaviour (e.g. in push_down_filter 
optimizer)
   
   Yes, I agree thank you @Jefffrey for your help debugging this issue as well 
as the suggestion on first good issues
   
   To make this easier for others to help with, here are some specific 
suggestions:
   1. Update the comment on `TableProvider::supports_filters_pushdown()` to say 
that the returned vector much have the same size as the `filters` argument. 
https://github.com/apache/arrow-datafusion/blob/a1ae15826245097e7c12d4f0ed3425b25af6c431/datafusion/core/src/datasource/provider.rs#L167-L178
   
   2. Add a check at the callsite that the vec returned from 
`supports_filters_pushdown` is the same size as the filters passed: 
https://github.com/apache/arrow-datafusion/blob/a1ae15826245097e7c12d4f0ed3425b25af6c431/datafusion/optimizer/src/push_down_filter.rs#L856-L859
   
   
   
   


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

Reply via email to