xudong963 commented on code in PR #15772:
URL: https://github.com/apache/datafusion/pull/15772#discussion_r2072637668
##########
datafusion/sql/src/expr/order_by.rs:
##########
@@ -61,13 +57,27 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
None => input_schema,
};
- let mut expr_vec = vec![];
- for e in exprs {
+ if order_by_exprs.is_empty() {
+ return Ok(vec![]);
+ }
Review Comment:
Why put the early return here? IMO, the earlier we do the check, the more
useless computation we can avoid.
--
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]