Skip to content

Commit 18b46bb

Browse files
committed
return error on excessive partition count
1 parent 8f62677 commit 18b46bb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

datafusion/core/src/datasource/listing/helpers.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,12 @@ pub async fn pruned_partition_list<'a>(
380380
partitions.len(),
381381
&list_path
382382
);
383+
if partitions.len() > 90 {
384+
return Err(DataFusionError::Execution(format!(
385+
"Excessive partition count due to unconstrainted filter: {}",
386+
partitions.len()
387+
)));
388+
}
383389

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

0 commit comments

Comments
 (0)