Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
e2d9f84
Backport physical range partitioning to branch 54
gene-bordegaray Jul 24, 2026
9baa581
Aggregations Support `Partitioning::Range` (#23239)
gene-bordegaray Jul 2, 2026
5f1da98
Add range partitioning sqllogictest fixture (#22607)
gene-bordegaray May 29, 2026
3598943
Add logical range partitioning representation (#22777)
gene-bordegaray Jun 10, 2026
51c8780
Add `ListingOptions::output_partitioning` and `FileScanConfig::output…
gene-bordegaray Jun 23, 2026
7a05648
feat: logical plan protobuf representation for range repartitioning (…
saadtajwar Jun 22, 2026
22159ad
Add `Distribution::HashPartitioned` to `Distribution::KeyPartitioned`…
gene-bordegaray Jul 1, 2026
d3a9271
feat: physical execution for range partitioning (#23231)
saadtajwar Jul 8, 2026
1d1ec1e
Support co-partitioned range inner equi joins (#23184)
gene-bordegaray Jul 10, 2026
1248881
feat: allow Partitioning::Range to satisfy window Distribution::KeyPa…
mithuncy Jul 14, 2026
e98fb60
Allow Range partitioned inputs to PartitionedTopK (#23355)
stuhood Jul 15, 2026
cd3a218
fix: preserve range partitioning through joins (#23584)
EdsonPetry Jul 15, 2026
a9de07a
Enforce co-partitioning for sort merge and symmetric hash joins (#23480)
gene-bordegaray Jul 15, 2026
6709f72
allow interleaveExec to support Range partioning (#23623)
Rich-T-kid Jul 16, 2026
7d37d4e
feat: allow Full joins to reuse range co-partitioning in HashJoinExec…
mattp5657 Jul 20, 2026
34149d9
feat: support co-partitioned range right-side equi hash joins (#23484)
gmhelmold Jul 21, 2026
e95b7a2
feat: complete range repartition physical planning (#23617)
saadtajwar Jul 21, 2026
5d0aaf5
feat(physical-plan): Allow co-partitioned Partitioning::Range inputs …
JSOD11 Jul 21, 2026
a785b2f
feat: Range Partitioning FFI (#23520)
saadtajwar Jul 22, 2026
7b01c11
allow range to satisfy key distribution generally (#23680)
gene-bordegaray Jul 23, 2026
4aed15d
Adapt range partitioning tests for branch 54
gene-bordegaray Jul 24, 2026
b73fd34
Fix KeyPartitioned co-partitioning docs
gene-bordegaray Aug 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions datafusion/catalog-listing/src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ pub fn evaluate_partition_prefix<'a>(
}
}

fn filter_partitions(
pub fn filter_partitioned_file(
pf: PartitionedFile,
filters: &[Expr],
df_schema: &DFSchema,
Expand Down Expand Up @@ -447,7 +447,7 @@ pub async fn pruned_partition_list<'a>(
))
})
.try_filter_map(move |pf| {
futures::future::ready(filter_partitions(pf, filters, &df_schema))
futures::future::ready(filter_partitioned_file(pf, filters, &df_schema))
})
.boxed())
}
Expand Down
54 changes: 53 additions & 1 deletion datafusion/catalog-listing/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use datafusion_common::plan_err;
use datafusion_datasource::ListingTableUrl;
use datafusion_datasource::file_format::FileFormat;
use datafusion_execution::config::SessionConfig;
use datafusion_expr::SortExpr;
use datafusion_expr::{Partitioning, SortExpr};
use futures::StreamExt;
use futures::TryStreamExt;
use itertools::Itertools;
Expand Down Expand Up @@ -61,6 +61,46 @@ pub struct ListingOptions {
/// multiple equivalent orderings, the outer `Vec` will have a
/// single element.
pub file_sort_order: Vec<Vec<SortExpr>>,
/// Declared output partitioning for scans from this table.
///
/// Expressions are logical expressions over the full table schema. When set,
/// [`ListingTable`](crate::ListingTable) creates one file group per
/// declared output partition. When unset, file grouping uses the scan-time
/// [`SessionConfig::target_partitions`](datafusion_execution::config::SessionConfig::target_partitions).
///
/// Files are listed in path order, split into whole-file groups across the
/// declared partition count, and then padded with trailing empty groups when
/// needed. DataFusion does not route files by partition values or validate
/// row placement, so callers must ensure file group `i` contains rows for
/// partition `i`. Layouts that require explicit file-to-partition assignment
/// are not supported.
///
/// For example, range partitioning on column `a` with split points
/// `[10, 20, 30]` declares four output partitions. With three path-ordered
/// files, the trailing partition is preserved as empty:
///
/// ```text
/// files in path order: f0, f1, f2
///
/// file groups:
/// partition 0: [f0]
/// partition 1: [f1]
/// partition 2: [f2]
/// partition 3: []
/// ```
///
/// With five path-ordered files, a partition can contain multiple files:
///
/// ```text
/// files in path order: f0, f1, f2, f3, f4
///
/// file groups:
/// partition 0: [f0, f1]
/// partition 1: [f2, f3]
/// partition 2: [f4]
/// partition 3: []
/// ```
pub output_partitioning: Option<Partitioning>,
}

impl ListingOptions {
Expand All @@ -78,6 +118,7 @@ impl ListingOptions {
collect_stat: false,
target_partitions: 1,
file_sort_order: vec![],
output_partitioning: None,
}
}

Expand Down Expand Up @@ -136,6 +177,17 @@ impl ListingOptions {
self
}

/// Set declared output partitioning.
///
/// See [`Self::output_partitioning`] for the contract.
pub fn with_output_partitioning(
mut self,
output_partitioning: Option<Partitioning>,
) -> Self {
self.output_partitioning = output_partitioning;
self
}

/// Set `table partition columns` on [`ListingOptions`] and returns self.
///
/// "partition columns," used to support [Hive Partitioning], are
Expand Down
Loading
Loading