diff --git a/src/dialect/spark.rs b/src/dialect/spark.rs index e14b4d033..534d18015 100644 --- a/src/dialect/spark.rs +++ b/src/dialect/spark.rs @@ -116,6 +116,13 @@ impl Dialect for SparkSqlDialect { true } + /// See: + /// - + /// - + fn supports_pipe_operator(&self) -> bool { + true + } + /// Parse the `DIV` keyword as integer division. /// /// Example: `SELECT 10 DIV 3` returns `3`. diff --git a/tests/sqlparser_spark.rs b/tests/sqlparser_spark.rs index 3e1886c1d..3ec46c107 100644 --- a/tests/sqlparser_spark.rs +++ b/tests/sqlparser_spark.rs @@ -327,3 +327,8 @@ fn test_substring() { "SELECT SUBSTRING(s, 1, 3) FROM t", ); } + +#[test] +fn test_pipe_operator() { + spark().verified_stmt("SELECT * FROM t |> WHERE x > 1 |> SELECT x AS y |> ORDER BY y"); +}