Skip to content

feat(doris): Constraints + ANALYZE + STATS (T8.3)#152

Merged
h3n4l merged 1 commit into
mainfrom
feat/doris/analyze
May 25, 2026
Merged

feat(doris): Constraints + ANALYZE + STATS (T8.3)#152
h3n4l merged 1 commit into
mainfrom
feat/doris/analyze

Conversation

@h3n4l
Copy link
Copy Markdown
Member

@h3n4l h3n4l commented May 25, 2026

ANALYZE DATABASE/TABLE/PROFILE, SHOW ANALYZE/STATS/CONSTRAINTS, DROP STATS, KILL ANALYZE, ALTER TABLE ADD/DROP CONSTRAINT (PRIMARY KEY/UNIQUE/FOREIGN KEY). 38 tests. DAG: T8.3 (P1). 🤖

…ANALYZE/STATS

Add P1 legacy parity for statistics and constraint management statements:

AST nodes (doris/ast/stats_nodes.go):
- AddConstraintStmt, DropConstraintStmt, ShowConstraintsStmt
- AnalyzeStmt, ShowAnalyzeStmt, ShowStatsStmt
- DropStatsStmt, KillAnalyzeStmt

Parser (doris/parser/stats.go):
- ANALYZE [DATABASE|TABLE|(bare)] [WITH SAMPLE PERCENT/ROWS|SYNC|INCREMENTAL]
- SHOW [ALL|QUEUED] ANALYZE [TASK STATUS job_id | FOR table | LIKE pat | job_id | bare name WHERE ...]
- SHOW [COLUMN|TABLE|INDEX|PARTITION] STATS [target] [WHERE ...]
- SHOW CONSTRAINTS FROM table
- DROP [EXPIRED|CACHED] STATS target [(cols)]
- KILL ANALYZE job_id
- ALTER TABLE t ADD CONSTRAINT name PRIMARY KEY/UNIQUE/FOREIGN KEY (...)
- ALTER TABLE t DROP CONSTRAINT name

Dispatch wired in parser.go and alter_table.go.
38 tests covering all forms including all 7 legacy corpus statements.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@h3n4l h3n4l force-pushed the feat/doris/analyze branch from 28dbb6e to 2002e27 Compare May 25, 2026 08:44
@h3n4l h3n4l merged commit bd94736 into main May 25, 2026
@h3n4l h3n4l deleted the feat/doris/analyze branch May 25, 2026 08:44
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.

1 participant