docteurklein commented on issue #1475: URL: https://github.com/apache/datafusion-sqlparser-rs/issues/1475#issuecomment-2609963101
I think I have the same problem with: ```sql select * from (select 'test' order by 1 asc) ``` It seems impossible to write a `visit_statements_mut`[1] or `visit_expressions_mut`[1] visitor that has access the `order_by` field of the subquery. It's only visible by the statement visitor via `Query.body.Select.from.TableWithJoin.order_by`. Those helpers[1] don't seem to allow for recursive visit. Maybe implementing the `VisitorMut` trait myself and implementing both post_visit_statement and post_visit_expr? Or maybe https://docs.rs/sqlparser/latest/sqlparser/ast/trait.VisitMut.html implies I should call `stmt.visit(ExprVisitor(stmt))` or something? -- 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