berkaysynnada commented on code in PR #15772:
URL: https://github.com/apache/datafusion/pull/15772#discussion_r2073028935


##########
datafusion/sql/src/query.rs:
##########
@@ -168,7 +169,27 @@ pub(crate) fn to_order_by_exprs_with_select(
         return not_impl_err!("ORDER BY INTERPOLATE is not supported");
     }
     match kind {
-        OrderByKind::All(_) => not_impl_err!("ORDER BY ALL is not supported"),
+        OrderByKind::All(order_by_options) => {
+            let Some(exprs) = select_exprs else {
+                return Ok(vec![]);
+            };
+            let order_by_exprs = exprs
+                .iter()
+                .filter_map(|select_expr| match select_expr {
+                    Expr::Column(column) => Some(OrderByExpr {
+                        expr: SQLExpr::Identifier(Ident {
+                            value: column.name.clone(),
+                            quote_style: None,
+                            span: Span::empty(),
+                        }),
+                        options: order_by_options.clone(),
+                        with_fill: None,
+                    }),
+                    _ => None,

Review Comment:
   Thank you @PokIsemaine, the PR seems good, but I have one question: Are we 
going to exclude select expressions which are not column? Is this the same 
behavior of duckDB?



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to