BenSatori opened a new pull request, #2493: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2493
PostgreSQL documents `trim([ LEADING | TRAILING | BOTH ] [ characters text ] FROM string text)` and its non-standard comma form with optional `FROM`: https://www.postgresql.org/docs/current/functions-string.html This change updates `parse_trim_expr` to handle `TRIM(FROM string)` for dialects that support Postgres-style comma-separated TRIM syntax, and preserves an explicit trim side for comma-form calls such as `TRIM(BOTH FROM string, characters)`. Tests: - `cargo test --test sqlparser_postgres parse_trim_from_without_characters` - `cargo test --test sqlparser_common parse_trim` - `cargo fmt --all` - `cargo test --all-features` - `cargo clippy --all-targets --all-features -- -D warnings` `cargo hfuzz run fuzz_parse_sql` was not run because `cargo-hfuzz` is not installed in this environment. AI assistance was used to prepare this change. -- 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]
