Pinot SQL DDL compiler and reverse-emitter. Translates CREATE TABLE, DROP TABLE, SHOW TABLES, and SHOW CREATE TABLE into the existing Schema + TableConfig model and back.
CREATE TABLE events ( id INT NOT NULL DIMENSION, city STRING DIMENSION, amount DOUBLE METRIC, ts TIMESTAMP DATETIME FORMAT 'TIMESTAMP' GRANULARITY '1:MILLISECONDS' ) TABLE_TYPE = OFFLINE PROPERTIES ( 'timeColumnName' = 'ts', 'replication' = '3' );
POST the SQL to /sql/ddl on the controller (see DESIGN.md §6 and the PR description for the full REST contract and more examples).
| Sub-package | Responsibility |
|---|---|
compile/ | Forward path: AST → (Schema, TableConfig). Entry point DdlCompiler. |
resolved/ | Typed intermediate representation between AST and final config. |
reverse/ | Reverse path: stored (Schema, TableConfig) → canonical DDL string. Entry point CanonicalDdlEmitter. |
DESIGN.md — design document covering grammar, routing rules, validation pipeline, exception → HTTP status contract, and decision log.src/main/java/org/apache/pinot/sql/ddl/package-info.java — module-level Javadoc with the same structure for IDE discoverability.