Alex Gaynor created ARROW-8902:
----------------------------------

             Summary: [rust][datafusion] optimize count(*) queries on parquet 
sources
                 Key: ARROW-8902
                 URL: https://issues.apache.org/jira/browse/ARROW-8902
             Project: Apache Arrow
          Issue Type: Bug
          Components: Rust - DataFusion
            Reporter: Alex Gaynor


Currently, as far as I can tell, when you perform a `select count(*) from 
dataset` in datafusion against a parquet dataset, the way this is implemented 
is by doing a scan on column 0, and counting up all of the rows (specifically I 
think it counts the # of rows in each batch).

 

However, for the specific case of just counting _everythign_ in a parquet file, 
you can just read the rowcount from the footer metadata, so it's O(1) instead 
of O(n)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to