gene-bordegaray commented on code in PR #22590:
URL: https://github.com/apache/datafusion/pull/22590#discussion_r3320484885
##########
datafusion/physical-expr/src/partitioning.rs:
##########
@@ -279,6 +279,54 @@ impl RangePartitioning {
self.split_points.len() + 1
}
+ /// Returns true when `self` and `other` describe the same range partition
+ /// map.
+ ///
+ /// Single-partition range partitionings are always compatible. Otherwise,
+ /// the two partitionings must have identical split points and equivalent
+ /// ordering expressions with the same sort options.
+ pub fn compatible_with(
+ &self,
+ other: &Self,
+ eq_properties: &EquivalenceProperties,
+ ) -> bool {
+ if self.partition_count() == 1 && other.partition_count() == 1 {
+ return true;
+ }
+
+ if self.split_points != other.split_points
Review Comment:
no since all the data can only be in one partition. But we could be stricter
and reject that although they would always work since only one partition exsists
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]