LucaCappelletti94 opened a new pull request, #2533: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2533
Fuzz round-trip found `SELECT ~ -1` rendering as `SELECT ~-1`, which PostgreSQL retokenizes as the single `~-` custom operator and fails to re-parse. `SELECT ~ ~1` renders `SELECT ~~1` and fails in every dialect, `~ @2` renders `~@2` and `~ #x` renders `~# x` in PostgreSQL. `Expr::UnaryOp` display concatenates operator and operand in its final arm. `BitwiseNot` joins the spaced arm beside `Not` and `Hash`, the same remedy #2531 applies to `@`. Canonical output for `SELECT ~expr` becomes `SELECT ~ expr`, pinned with `one_statement_parses_to` in `parse_generic_unary_ops`. -- 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]
