You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jychen7 (via GitHub)" <gi...@apache.org> on 2023/04/10 02:45:22 UTC

[GitHub] [arrow-datafusion] jychen7 commented on issue #4028: Return TableProviderFilterPushDown::Exact when Parquet Pushdown Enabled

jychen7 commented on issue #4028:
URL: https://github.com/apache/arrow-datafusion/issues/4028#issuecomment-1501321250

   I think it is a good idea. I confirm it would help improve performance by 30x in https://github.com/apache/arrow-datafusion/issues/5404#issuecomment-1501221831.
   
   ---
   
   I am thinking to pick this up but seems the work is not as trivial as I thought. Following are my two cents' thoughts.
   
   Related code to improve is following
   https://github.com/apache/arrow-datafusion/blob/7545177001b9dc04951f0c1c2008509f3895de8e/datafusion/core/src/datasource/listing/table.rs#L736-L756
   
   > 1. The FileFormat is parquet
   
   This is trivial, we can `match self.options.format` with `ParquetFormat`
   
   > 2. Parquet predicate pushdown is enabled
   
   This setting could come from `ParquetExec.pushdown_filters` or `ConfigOptions` (more specifically, `ConfigOptions.execution.parquet.pushdown_filters`)
   
   https://github.com/apache/arrow-datafusion/blob/7545177001b9dc04951f0c1c2008509f3895de8e/datafusion/core/src/physical_plan/file_format/parquet.rs#L393
   
   However, when `ListingTable.supports_filter_pushdown` is called, `ParquetExec` is not created yet, nor does `SessionState` being passed as input.
   
   Idea: shall we add `state: &SessionState` as input for `ListingTable.supports_filter_pushdown`, the same as `ListingTable.scan` ❓ 
   
   https://github.com/apache/arrow-datafusion/blob/7545177001b9dc04951f0c1c2008509f3895de8e/datafusion/core/src/datasource/listing/table.rs#L668-L670
   
   > 3. The predicate is fully pushed down by ParquetExec (not all predicates are supported)
   
   is it making sure the `row_filter` is built from the `predicate` without error? If so, seems it requires converting a logical `Expr` to `PhysicalExpr` first.
   
   https://github.com/apache/arrow-datafusion/blob/7545177001b9dc04951f0c1c2008509f3895de8e/datafusion/core/src/physical_plan/file_format/parquet.rs#L527-L547
   


-- 
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@arrow.apache.org

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