You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/03/16 06:42:22 UTC

[GitHub] [arrow-datafusion] yjshen commented on a change in pull request #2000: Fixed parquet path partitioning when only selecting partitioned columns

yjshen commented on a change in pull request #2000:
URL: https://github.com/apache/arrow-datafusion/pull/2000#discussion_r827672701



##########
File path: datafusion/src/physical_plan/file_format/parquet.rs
##########
@@ -236,32 +237,56 @@ impl ExecutionPlan for ParquetExec {
 
         let adapter = SchemaAdapter::new(self.base_config.file_schema.clone());
 
-        let join_handle = task::spawn_blocking(move || {
-            if let Err(e) = read_partition(
-                object_store.as_ref(),
-                adapter,
-                partition_index,
-                &partition,
-                metrics,
-                &projection,
-                &pruning_predicate,
-                batch_size,
-                response_tx.clone(),
-                limit,
-                partition_col_proj,
-            ) {
-                println!(
+        let join_handle = if projection.is_empty() {
+            task::spawn_blocking(move || {
+                if let Err(e) = read_partition_no_file_columns(
+                    object_store.as_ref(),
+                    &partition,
+                    batch_size,
+                    response_tx.clone(),

Review comment:
       Let us pass down `pruning_predicate` and `metrics`, do row group level filtering in `read_partition_no_file_columns` since it's possible to eliminate the whole parquet file together with its partition column value when all its row groups fail the filter. At the same time, `limit` would also be affected.




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