mustafasrepo commented on code in PR #9874:
URL: https://github.com/apache/arrow-datafusion/pull/9874#discussion_r1546125400
##########
datafusion/core/src/physical_planner.rs:
##########
@@ -1667,20 +1663,34 @@ pub fn create_aggregate_expr_with_name_and_maybe_filter(
)?),
None => None,
};
- let order_by = match order_by {
- Some(e) => Some(create_physical_sort_exprs(
- e,
- logical_input_schema,
- execution_props,
- )?),
- None => None,
- };
+
+ let try_create_physical_sort_expr =
+ |order_by: &Option<Vec<Expr>>| ->
Result<Option<Vec<PhysicalSortExpr>>> {
+ let physical_sort_exprs = match order_by {
+ Some(e) => Some(
+ e.iter()
+ .map(|expr| {
+ create_physical_sort_expr(
+ expr,
+ logical_input_schema,
+ execution_props,
+ )
+ })
+ .collect::<Result<Vec<_>>>()?,
Review Comment:
You can use `create_physical_sort_exprs` util for this chunk.
--
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]