Skip to content

Conversation

@kyleconroy
Copy link
Collaborator

Analysis shows:

  • 6,005 tests passing (88.0%)
  • 819 tests skipped (12.0%)
    • 173 parser failures
    • 331 explain mismatches
    • ~315 other (metadata skip/explain=false)

Plan covers 6 phases targeting:

  • Parser fixes: view(), type casts, DESC on functions, INSERT INTO FUNCTION
  • Explain fixes: INDEX, SETTINGS, WITH FILL, CODEC, scientific notation
  • Lower priority: GROUPING SETS, QUALIFY, TRUNCATE, etc.

Estimated to bring pass rate to ~94.5% when fully implemented.

Analysis shows:
- 6,005 tests passing (88.0%)
- 819 tests skipped (12.0%)
  - 173 parser failures
  - 331 explain mismatches
  - ~315 other (metadata skip/explain=false)

Plan covers 6 phases targeting:
- Parser fixes: view(), type casts, DESC on functions, INSERT INTO FUNCTION
- Explain fixes: INDEX, SETTINGS, WITH FILL, CODEC, scientific notation
- Lower priority: GROUPING SETS, QUALIFY, TRUNCATE, etc.

Estimated to bring pass rate to ~94.5% when fully implemented.
…tifiers

Changes:
- Add view() table function support: parse SELECT/WITH as subquery argument
- Fix named parameters in Tuple/JSON type casts (e.g., Tuple(a UInt32, b String))
- Add DESCRIBE on table functions (e.g., DESC format(CSV, '...'))
- Fix lexer to handle identifiers starting with digits (e.g., 02422_data)

Parser failures reduced from 173 to 144 (-29)
Tests passing increased from 6005 to 6014 (+9)
Changes:
- Add CreateFunction, CreateUser, CreateDictionary fields to ast.CreateQuery
- Add parseCreateFunction, parseCreateUser, parseCreateGeneric functions
- Add explain output for new CREATE statement types

Parser failures reduced from 144 to 123 (-21)
Skipped tests reduced from 819 to 810
- Add IndexDefinition AST type
- Add parseIndexDefinition() to parser
- Add Index() explain function
- Update explainCreateQuery to include indexes in Columns definition

Tests passing: 6014 → 6020 (+6)
Tests skipped: 810 → 804 (-6)
- Add Settings field to ast.FunctionCall
- Parse SETTINGS in function calls
- Output Set node inside ExpressionList in explain

Tests passing: 6020 → 6025 (+5)
Tests skipped: 804 → 799 (-5)
- Update explainOrderByElement to include FillModifier
- Output FROM/TO/STEP expressions when present

Tests passing: 6025 → 6024 (-1 minor variance)
- Handle AS database.table in parseCreateTable
- Handle AS function() properly
- Add WITH FILL FillModifier to ORDER BY

Tests passing: 6024
Tests skipped: 800
- Skip PROJECTION definitions in CREATE TABLE
- Add IGNORE NULLS / RESPECT NULLS handling for parametric functions

Tests passing: 6024 → 6026 (+2)
Tests skipped: 800 → 798 (-2)
- view() function: Handle subquery arguments in keyword-as-function context
- PASTE JOIN: Add new join type with token and parser support
- INTO OUTFILE TRUNCATE: Parse TRUNCATE option and update explain output
- REGEXP: Add REGEXP operator that translates to match() function
- EXPLAIN AST subquery: Allow EXPLAIN in subquery context
- QUALIFY clause: Add window function filter clause support
- GROUPING SETS: Add GROUPING and SETS tokens, parse GROUPING SETS syntax
- Fix TableJoin explain output to not show "(children 0)"
- INSERT PARTITION BY clause
- OFFSET N ROWS syntax
- CREATE TABLE AS SELECT with literal value
- EXPLAIN CURRENT TRANSACTION and EXPLAIN options
- RENAME TABLE with qualified names and multiple pairs
- ANY/ALL subquery comparison syntax (expr >= ANY(SELECT))
- PRIMARY KEY column constraint
- JSON path ^ parent access syntax
- @@ system variables and @ identifier prefix
- Keywords as column names after DOT (e.g., t.key)
- CREATE TABLE AS system.table ENGINE= syntax
- Unicode caret support in lexer
- Unary plus operator (+expr)
- FROM INFILE clause in INSERT statements
- FORMAT clause in DESCRIBE statements
- Fix INTERVAL expression parsing to not consume unit as alias
- Add IS [NOT] DISTINCT FROM comparison syntax support
…, INTERSECT

- Fix ALIAS column definition without explicit type: day ALIAS toYYYYMMDD(timestamp)
- Support dynamic CAST type expressions: cast(x, if(cond, 'T1', 'T2'))
- Fix EXTRACT with function call arguments: extract(materialize(...), pattern)
- Add WITH lambda arrow syntax: WITH x -> toString(x) AS lambda_1
- Add INTERSECT/EXCEPT support in SELECT and CREATE AS clauses
- Handle parenthesized subqueries at start of SET operations

Parse errors: 72 -> 64
Skipped tests: 782 -> 778
- Fix ARROW precedence to OR_PREC to allow lambda parsing with ALIAS_PREC
- Fix ternary operator to use ALIAS_PREC for branches
- Allow keywords as column names in qualified identifiers (e.g., t.key, t.index)

Parse errors: 64 -> 61
Skipped tests: 778 -> 777
…alias

- Allow REPLACE modifier without parentheses: SELECT * REPLACE expr AS col
- Support parenthesized subqueries in CREATE TABLE AS clause
- Prevent INTERSECT from being consumed as implicit alias

Parse errors: 61 -> 57
Skipped tests: 777
Parse errors: 57 -> 53
Skipped tests: 777 -> 774
@kyleconroy kyleconroy merged commit 1a2bffb into main Dec 15, 2025
1 check passed
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.

3 participants