ksaiharshavinay opened a new pull request, #3071:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/3071
Fixes #2809.
PostgreSqlDialect split `*=` into Mul + Eq and `@@@` into AtAt + AtSign, so
statements using them failed to parse or misparsed.
- Tokenizer: when `*` is followed by `=`, `<`, or `>` in a dialect with
custom operator parts (only PostgreSQL), scan the composite operator (`*=`,
`*<`, `*<=`, `*<>`, `*>`, `*>=`) as one CustomBinaryOperator token. The scan
stops before a trailing `+`/`-`, which PostgreSQL trims from such operators, so
`a*=-1` stays `*=` + Minus + 1.
- The `@@` arm now absorbs a third `@` into CustomBinaryOperator("@@@");
plain `@@` still returns AtAt, and other dialects are unchanged.
- Tests: tokenizer tests for both operators and the trailing-sign cases,
verified_stmt round-trips in sqlparser_postgres (including
OPERATOR(pg_catalog.*=) and OPERATOR(pg_catalog.@@@)), plus fuzz seeds per
AGENTS.md.
cargo test --all-features: 1984 passed. cargo fmt --check and clippy -D
warnings clean.
Disclosure: prepared with AI assistance (Claude), including the review pass.
--
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]