Skip to content

Commit

Permalink
log query without partition prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
houqp committed May 28, 2024
1 parent 524670a commit 8f62677
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions datafusion/core/src/datasource/listing/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use arrow_array::Array;
use arrow_schema::Fields;
use futures::stream::FuturesUnordered;
use futures::{stream::BoxStream, StreamExt, TryStreamExt};
use log::{debug, trace};
use log::{debug, info, trace, warn};

use crate::{error::Result, scalar::ScalarValue};

Expand Down Expand Up @@ -367,18 +367,24 @@ pub async fn pruned_partition_list<'a>(
_ => {}
}
}
let partitions = list_partitions(
store,
partitioned_table_path.as_ref().unwrap_or(table_path),
list_partiton_depth,
)
.await?;
debug!("Listed {} partitions", partitions.len());
if partitioned_table_path.is_none() {
warn!(
"table ({}) query without partition prefix: {:?}",
table_path, filters
);
}
let list_path = partitioned_table_path.as_ref().unwrap_or(table_path);
let partitions = list_partitions(store, list_path, list_partiton_depth).await?;
info!(
"Listed {} partitions for path: {}",
partitions.len(),
&list_path
);

let pruned =
prune_partitions(table_path, partitions, filters, partition_cols).await?;

debug!("Pruning yielded {} partitions", pruned.len());
info!("Pruning yielded {} partitions", pruned.len());

let stream = futures::stream::iter(pruned)
.map(move |partition: Partition| async move {
Expand Down

0 comments on commit 8f62677

Please sign in to comment.