LucaCappelletti94 opened a new pull request, #2531:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2531

   `SELECT @ -2` fails to round-trip on PostgreSQL. The prefix `@` 
(`UnaryOperator::PGAbs`) renders with no space, so the AST displays as `SELECT 
@-2` and re-parsing aborts in the tokenizer with `Expected a valid binary 
operator after '@-'`, because `@-` is reserved as a geometric binary operator 
prefix. Found by the `fuzz_parse_roundtrip` target introduced in #2530.
   
   `PGAbs` now renders with a trailing space, joining `NOT`, `#`, `@-@`, `@@`, 
`?-` and `?|`, which already use that arm for the same re-tokenization hazard, 
and matching the existing doc-comment example `@ -9`. The canonical output of 
`SELECT @a` becomes `SELECT @ a`.


-- 
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]

Reply via email to