shuvamk opened a new pull request, #2425:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2425
Databricks SQL is built on Spark SQL, but `DatabricksDialect` never got
three of the flags `SparkSqlDialect` sets. These fail on `DatabricksDialect`
and parse on `SparkSqlDialect`:
```sql
CREATE TABLE t (id BIGINT) USING DELTA
CREATE TABLE t (m MAP<STRING, INT>)
```
with `Expected: end of statement, found: USING at Line: 1, Column: 28` and
`Expected: ',' or ')' after column definition, found: < at Line: 1, Column: 22`.
`CREATE TABLE t (id LONG)` parses, but builds a `DataType::Custom` holding
`LONG` instead of `DataType::BigInt(None)`. Databricks gives the type as `{
BIGINT | LONG }` —
https://docs.databricks.com/aws/en/sql/language-manual/data-types/bigint-type
The fix sets those three flags on `DatabricksDialect`, mirroring
`src/dialect/spark.rs`. No parser change, no other dialect affected.
Tests are in `tests/sqlparser_databricks.rs` and all three fail with
`src/dialect/databricks.rs` reverted. The `AGENTS.md` pre-commit checks are
clean locally.
--
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]