alamb commented on issue #9726: URL: https://github.com/apache/arrow-datafusion/issues/9726#issuecomment-2032805023
> I noticed that in the `sqlparser-rs` crate, [OrderByExpr](https://github.com/sqlparser-rs/sqlparser-rs/blob/e747c9c2af08f4ea12e8d1692adf95998209e2a1/src/ast/query.rs#L1149-L1155) is not part of the `sqlparser::ast::Expr` enum (which is the return type for `expr_to_sql`), which is a problem when I was implementing this for `Expr::Sort`. > > So I wanted to get some thoughts on how best to proceed, should we make a change in `sqlparser-rs`, or should we just create a new enum to encapsulate the two, or anything else. I think when converting `Expr::Sort` to an `sql::ast::Expr` it should just return its inner Expr (and igore the ORDER BY information) The ORDER BY information is required when turning the expression back into an entire query I think... But at first just converting to `sql::ast::Expr` by ignoring the ORDER BY is probably correct in most cases -- 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]
