finchxxia opened a new pull request, #2380:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2380
## Summary
Adds Doris SQL dialect support to close #2379
This PR introduces `DorisDialect` and parser/AST support for common Doris
SQL syntax, especially Doris `CREATE TABLE` clauses, partition/distribution
definitions, table properties, Doris column options, and Doris load statements.
## Changes
- Add `DorisDialect`
- backtick-delimited identifiers
- Doris-style identifiers
- backslash string escapes
- Doris-specific parser capability gates
- Add Doris `CREATE TABLE` support
- `ENGINE = OLAP`
- `DUPLICATE KEY`, `UNIQUE KEY`, `AGGREGATE KEY`
- table-level `COMMENT`
- `PARTITION BY RANGE/LIST`
- `AUTO PARTITION`
- partition values including `MAXVALUE` / `MAX_VALUE`
- fixed and batch range partitions
- `DISTRIBUTED BY HASH/RANDOM`
- `BUCKETS <n>` and `BUCKETS AUTO`
- `PROPERTIES (...)`
- Add Doris AST structures
- key model
- partition model
- distribution model
- bucket declarations
- Doris load statements
- Add Doris-specific statement parsing
- `LOAD DATA INFILE`
- `CREATE ROUTINE LOAD`
- Extend tests
- Doris round-trip parser tests
- structured AST assertions
- generic/ANSI rejection cases for Doris-only syntax
- table comment escaping
- compatibility checks for surrounding dialect behavior
## Testing
```bash
cargo fmt --check
cargo test --test sqlparser_doris
--
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]