alamb commented on code in PR #11958:
URL: https://github.com/apache/datafusion/pull/11958#discussion_r1715212324
##########
datafusion/sql/src/unparser/plan.rs:
##########
@@ -359,18 +359,14 @@ impl Unparser<'_> {
.iter()
.map(|e| self.select_item_to_sql(e))
.collect::<Result<Vec<_>>>()?;
- match &on.sort_expr {
- Some(sort_expr) => {
- if let Some(query_ref) = query {
- query_ref
-
.order_by(self.sort_to_sql(sort_expr.clone())?);
- } else {
- return internal_err!(
- "Sort operator only valid in a statement
context."
- );
- }
+ if let Some(sort_expr) = &on.sort_expr {
Review Comment:
this is fine too.
--
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]