moshap-firebolt opened a new pull request, #2358:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2358

   Spark 4.0 added pipe-syntax SQL (`|>`), sharing the operator set already 
implemented for BigQuery and `GenericDialect`. This PR flips the 
`Dialect::supports_pipe_operator` flag on `SparkSqlDialect` so the existing 
pipe-operator parser path applies to Spark too — no new parser code.
   
   **Before** — Spark rejected pipe syntax:
   ```
   SELECT * FROM t |> WHERE x > 1 |> SELECT x AS y |> ORDER BY y
   -- ParserError
   ```
   
   **After** — parses and round-trips correctly under `SparkSqlDialect`.
   
   ### Tests
   - The 19 `parse_pipe_operator_*` tests and 
`parse_pipeline_operator_negative_tests` in `tests/sqlparser_common.rs` gate on 
`all_dialects_where(|d| d.supports_pipe_operator())`, so they now exercise 
Spark automatically (all 20 pass).
   - Adds a Spark-specific `test_pipe_operator` to `tests/sqlparser_spark.rs` 
to document the capability and guard against regressions if the shared gating 
changes.
   
   `cargo test --all-features`, `cargo fmt --all`, and `cargo clippy 
--all-targets --all-features -- -D warnings` all pass locally.
   
   ### Refs
   - Spark pipe-syntax docs: 
https://spark.apache.org/docs/latest/sql-pipe-syntax.html
   - Spark 4.0 release notes: 
https://spark.apache.org/releases/spark-release-4-0-0.html
   - SPARK-49528 (umbrella JIRA): 
https://issues.apache.org/jira/browse/SPARK-49528
   - SPARK-50778 (parser feature): 
https://issues.apache.org/jira/browse/SPARK-50778


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