mingmwang commented on code in PR #5772:
URL: https://github.com/apache/arrow-datafusion/pull/5772#discussion_r1152687617
##########
datafusion/core/src/physical_plan/windows/mod.rs:
##########
@@ -187,6 +188,30 @@ fn create_built_in_window_expr(
})
}
+pub(crate) fn calc_requirements(
+ partition_by_exprs: &[Arc<dyn PhysicalExpr>],
+ orderby_sort_exprs: &[PhysicalSortExpr],
+) -> Option<Vec<PhysicalSortRequirement>> {
+ let mut sort_reqs = vec![];
+ for partition_by in partition_by_exprs {
+ sort_reqs.push(PhysicalSortRequirement {
+ expr: partition_by.clone(),
+ options: None,
Review Comment:
Another example that the sorting direction is not that important is the
SortMergeJoin, but the additional requirements
is for all its input, the ordering should be aligned, should be `ASC` or
`DESC` altogether. I think the current `PhysicalSortRequirement` API can not
represent this alignment constraints explicitly.
--
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]