Skip to content

Doris SQL: create table model#2382

Closed
finchxxia wants to merge 3 commits into
apache:mainfrom
finchxxia:draft/doris-create-table-model
Closed

Doris SQL: create table model#2382
finchxxia wants to merge 3 commits into
apache:mainfrom
finchxxia:draft/doris-create-table-model

Conversation

@finchxxia

Copy link
Copy Markdown
Contributor

Summary

Adds Doris SQL dialect support to close #2379

This is PR 2 of a stacked Doris SQL support series. previous PR: #2380

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

cargo fmt --check
cargo test --test sqlparser_doris

@finchxxia finchxxia marked this pull request as draft June 18, 2026 05:41
@finchxxia finchxxia closed this Jun 18, 2026
@finchxxia finchxxia deleted the draft/doris-create-table-model branch June 18, 2026 06:00
@finchxxia finchxxia restored the draft/doris-create-table-model branch June 18, 2026 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DorisSQL: add Doris Dialect

1 participant