Rich-T-kid commented on code in PR #23623:
URL: https://github.com/apache/datafusion/pull/23623#discussion_r3596195072
##########
datafusion/physical-plan/src/union.rs:
##########
@@ -1288,6 +1295,66 @@ mod tests {
);
}
+ fn make_range_exec(
+ schema: &SchemaRef,
+ split_values: Vec<i32>,
+ descending: bool,
+ ) -> Result<Arc<dyn ExecutionPlan>> {
+ let sort_expr = PhysicalSortExpr::new(
+ col("a", schema)?,
+ SortOptions {
+ descending,
+ nulls_first: false,
+ },
+ );
+ let ordering = LexOrdering::new(vec![sort_expr]).unwrap();
+ let split_points = split_values
+ .into_iter()
+ .map(|v| SplitPoint::new(vec![ScalarValue::Int32(Some(v))]))
+ .collect();
+ let partitioning =
+ Partitioning::Range(RangePartitioning::try_new(ordering,
split_points)?);
+ let base = Arc::new(TestMemoryExec::try_new(&[], Arc::clone(schema),
None)?);
+ Ok(Arc::new(RepartitionExec::try_new(base, partitioning)?))
+ }
+
+ #[test]
+ fn test_can_interleave_range_matching() -> Result<()> {
Review Comment:
This sounds great. Ill update the PR
--
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]