Skip to content

Commit fe2c1ef

Browse files
Link range partitioning follow-up issues
1 parent 2ad27aa commit fe2c1ef

5 files changed

Lines changed: 18 additions & 6 deletions

File tree

datafusion/ffi/src/physical_expr/partitioning.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ impl From<&Partitioning> for FFI_Partitioning {
4646
Self::Hash(exprs, *size)
4747
}
4848
// FFI does not yet expose range partition metadata.
49+
// See https://github.com/apache/datafusion/issues/22394
4950
Partitioning::Range(range) => {
5051
Self::UnknownPartitioning(range.partition_count())
5152
}

datafusion/physical-expr/src/partitioning.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ impl Display for Partitioning {
161161
/// partition 0: key < split_points[0]
162162
/// partition 1: split_points[0] <= key < split_points[1]
163163
/// ...
164+
/// partition N - 1: split_points[N - 2] <= key < split_points[N - 1]
164165
/// partition N: split_points[N - 1] <= key
165166
/// ```
166167
///
@@ -201,12 +202,9 @@ impl Display for Partitioning {
201202
/// not implemented and will be introduced incrementally.
202203
#[derive(Debug, Clone)]
203204
pub struct RangePartitioning {
204-
/// Ordered partitioning key. Sort options are part of the partitioning
205-
/// because `ASC`/`DESC` and null ordering decide which side of a split point
206-
/// a row belongs to.
205+
/// Ordered partitioning key.
207206
ordering: LexOrdering,
208-
/// Boundaries between adjacent partitions. `N` split points define `N + 1`
209-
/// partitions as described in [`RangePartitioning`].
207+
/// Boundaries between adjacent partitions.
210208
split_points: Vec<SplitPoint>,
211209
}
212210

datafusion/physical-plan/src/joins/utils.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ pub fn adjust_right_output_partitioning(
145145
Partitioning::Hash(new_exprs, *size)
146146
}
147147
Partitioning::Range(_) => {
148+
// Range partitioning optimizer propagation is tracked in
149+
// https://github.com/apache/datafusion/issues/22395
148150
return not_impl_err!(
149151
"Join output partitioning with range partitioning is not implemented"
150152
);

datafusion/physical-plan/src/repartition/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,8 @@ impl BatchPartitioner {
739739
))
740740
}
741741
Partitioning::Range(_) => {
742+
// Range repartition execution is tracked in
743+
// https://github.com/apache/datafusion/issues/22397
742744
not_impl_err!(
743745
"Range partitioning execution is not implemented by RepartitionExec"
744746
)
@@ -1452,6 +1454,8 @@ impl ExecutionPlan for RepartitionExec {
14521454
Partitioning::Hash(new_partitions, *size)
14531455
}
14541456
Partitioning::Range(_) => {
1457+
// Range partitioning optimizer propagation is tracked in
1458+
// https://github.com/apache/datafusion/issues/22395
14551459
return not_impl_err!(
14561460
"Projection pushdown through RepartitionExec with range partitioning is not implemented"
14571461
);
@@ -1494,6 +1498,8 @@ impl ExecutionPlan for RepartitionExec {
14941498
}
14951499
match self.partitioning() {
14961500
Partitioning::Range(_) => {
1501+
// Range partitioning optimizer propagation is tracked in
1502+
// https://github.com/apache/datafusion/issues/22395
14971503
return not_impl_err!(
14981504
"Sort pushdown through RepartitionExec with range partitioning is not implemented"
14991505
);
@@ -1526,6 +1532,8 @@ impl ExecutionPlan for RepartitionExec {
15261532
Hash(hash, _) => Hash(hash, target_partitions),
15271533
UnknownPartitioning(_) => UnknownPartitioning(target_partitions),
15281534
Range(_) => {
1535+
// Range repartition execution is tracked in
1536+
// https://github.com/apache/datafusion/issues/22397
15291537
return not_impl_err!(
15301538
"Changing RepartitionExec partition counts with range partitioning is not implemented"
15311539
);
@@ -1659,6 +1667,8 @@ impl RepartitionExec {
16591667
)
16601668
}
16611669
Partitioning::Range(_) => {
1670+
// Range repartition execution is tracked in
1671+
// https://github.com/apache/datafusion/issues/22397
16621672
return not_impl_err!(
16631673
"Range partitioning execution is not implemented by RepartitionExec"
16641674
);

datafusion/physical-plan/src/sorts/sort.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,8 @@ impl ExecutionPlan for SortExec {
11421142
vec![Distribution::UnspecifiedDistribution]
11431143
} else {
11441144
// global sort
1145-
// TODO support RangePartition and OrderedDistribution
1145+
// TODO support range partitioning and OrderedDistribution.
1146+
// See https://github.com/apache/datafusion/issues/22395
11461147
vec![Distribution::SinglePartition]
11471148
}
11481149
}

0 commit comments

Comments
 (0)