Commit Graph

15 Commits

Author SHA1 Message Date
Evan
2d6390d79c test(trino): cover missing-RETURN and semicolon-comment edge cases
Adds unit tests for the two Trino dialect branches the CI coverage gate
flagged as untested: a RETURN body with no following expression, and a
statement-terminating semicolon that carries an attached comment or has
no trailing statement.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 06:28:02 -07:00
Evan
9982dbaf83 fix(trino): support inline SQL UDFs (WITH FUNCTION ... BEGIN ... END)
sqlglot cannot parse Trino SQL routine syntax, so queries declaring
inline UDFs failed to parse in SQL Lab: the parser splits statements
on every semicolon (including the ones inside BEGIN ... END routine
bodies) and has no grammar for FUNCTION specifications in a WITH
clause. The upstream issue (tobymao/sqlglot#5178) was closed as low
priority, so this extends the Trino dialect on the Superset side.

The custom dialect keeps routine bodies intact when splitting
statements and parses inline function specifications into opaque
InlineUDF nodes that regenerate verbatim. Trino does not allow queries
inside SQL UDF bodies, so the opaque representation hides no table
references from Superset's security checks. The extensions only
activate on syntax that fails to parse today, so existing queries are
unaffected.

Fixes #26162

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 11:22:45 -07:00
Beto Dealmeida
4311a15eb2 feat(sqlglot): Vertica dialect (#39969) 2026-05-08 14:34:34 -03:00
Vitor Avila
ad5e3170dd fix: OpenSearch dialect identifier delimiters (#39953) 2026-05-07 16:19:27 -03:00
Vitor Avila
5af17c7976 fix(OpenSearch): OpenSearch dialect for sqlglot (#39538) 2026-04-22 12:17:15 -03:00
Beto Dealmeida
e4cb84bc02 feat: DB2 dialect for sqlglot (#36365) 2025-12-02 12:19:52 -05:00
Beto Dealmeida
3202ff4b3f fix(pinot): more functions (#35451) 2025-10-02 13:01:47 -04:00
Beto Dealmeida
30021f8ede fix(pinot): SUBSTR function (#35427) 2025-10-02 10:29:18 -04:00
Beto Dealmeida
f3349388d0 fix(pinot): DATE_SUB function (#35426) 2025-10-02 10:12:19 -04:00
Beto Dealmeida
5428376662 fix(pinot): DATE_ADD function (#35424) 2025-10-02 09:56:20 -04:00
Beto Dealmeida
aa97d2fe03 fix(pinot): dialect date truncation (#35420)
Co-authored-by: bito-code-review[bot] <188872107+bito-code-review[bot]@users.noreply.github.com>
2025-10-01 13:16:46 -04:00
Beto Dealmeida
bf88d9bb1c fix(pinot): restrict types in dialect (#35337) 2025-09-30 16:34:53 -04:00
Beto Dealmeida
4e093a8e2a feat: sqlglot dialect for Pinot (#35333) 2025-09-29 21:56:35 -04:00
Beto Dealmeida
404f7c1043 feat: initial Dremio sqlglot dialect (#33847) 2025-06-20 12:05:45 -07:00
Beto Dealmeida
edc60914f6 chore: 100% test coverage for SQL parsing (#33568) 2025-06-04 22:18:09 -04:00