Skip to content

Add Vertica dialect and preserve native SQL semantics - #468

Merged
tobilg merged 8 commits into
mainfrom
fix/pr-467-vertica
Sep 24, 2026
Merged

tobilg merged 8 commits into
mainfrom
fix/pr-467-vertica

Conversation

@tobilg

@tobilg tobilg commented Sep 22, 2026 •

Copy link
Copy Markdown
Owner

Vertica has dialect-specific syntax and semantics that generic PostgreSQL-style parsing and translation can lose. This change adds the dialect across Rust, Python, Go/FFI, and WASM/TypeScript, models the reviewed native forms, and rejects reviewed cross-dialect conversions when equivalent behavior has not been established.

Builds on #467, preserving the original contribution by @ArjixWasTaken and adding the review fixes in three follow-up commits.

Changes

  • Add structured support for TIMESERIES, MATCH, INTERPOLATE, partitioned LIMIT, historical queries, projections, physical table clauses, FLEX TABLE, COPY LOCAL/parser arguments, and EXPORT TO PARQUET.
  • Preserve collection types and bounds, ROW fields, interval precision, binary values, function parameters, nested factorials, null ordering, hints, and locks. Bare KSAFE survives AST/JSON round trips.
  • Correct approximate-count filters and implement reviewed PostgreSQL/DuckDB conversions for array access, supported slices, date-boundary differences, binary literals, and partitioned LIMIT.
  • Return errors for reviewed unsafe conversions at every unsupported level, including Ignore and Warn. Examples include LISTAGG byte limits/overflow, safe-cast failure behavior, locks, and native-only clauses.
  • Integrate parser, generator, and expression changes into the existing files. Add regressions to existing Rust, Python, Go, and SDK test files; no imported SQLGlot fixtures are excluded.

Coverage limits

General SQL uses the existing dialect pipeline. The new Vertica-specific semantic mappings focus on PostgreSQL and DuckDB; native support does not imply an equivalent conversion to every target.

Week/timezone/untyped date differences, dynamic or negative slice bounds, unknown top-level sort types, constrained collection/ROW types, and unsupported partitioned-LIMIT combinations remain explicit errors. Reviewed Vertica-specific DDL, event-series queries, historical queries, and data-movement statements support native round trips but have no foreign mapping.

Native cases were checked against the Vertica reference and structured round trips. DuckDB value regressions execute against DuckDB; no live Vertica or PostgreSQL server was used.

Validation

  • make test-rust-verify with DuckDB value checks enabled: passed.
  • make test-go-integration: passed against the freshly built optimized FFI library.
  • SDK build, type checking, lint, and tests: 614 tests passed.
  • Python tests and type checking: 320 passed, 1 skipped; no type errors.
  • WASM builds and library tests: 135 tests passed.
  • Minimal feature checks, make lint-rust, Rust/Go formatting, and make check-consistency: passed.

@tobilg tobilg mentioned this pull request Sep 22, 2026
Resolve HANA and Vertica conflicts in shared parsing, normalization,
generation, dialect registration, and bindings. Preserve both dialects'
semantic guards and add regressions for cross-dialect conversions.
Update binding checks for the combined 36-dialect list.
@tobilg
tobilg merged commit 3ab81d8 into main Sep 24, 2026
23 checks passed
@tobilg
tobilg deleted the fix/pr-467-vertica branch September 24, 2026 10:11
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.

2 participants