Commit Graph

62 Commits

Author SHA1 Message Date
Alexandru Soare
68adc2cb41 fix(mcp): Block destructive DDL (DROP, TRUNCATE, ALTER) in execute_sql (#39621)
(cherry picked from commit b98bd2a07a)
2026-06-03 09:13:54 -07:00
Beto Dealmeida
73db5fa5f4 feat(sqlglot): Vertica dialect (#39969)
(cherry picked from commit 4311a15eb2)
2026-05-08 11:49:22 -07:00
Vitor Avila
fe1ab92778 fix: OpenSearch dialect identifier delimiters (#39953)
(cherry picked from commit ad5e3170dd)
2026-05-08 11:39:36 -07:00
Alexandru Soare
0008a0606d fix(sql): quote identifiers in transpile_to_dialect to fix case-sensitive column filters (#39521)
(cherry picked from commit adfbbf1433)

Adapted: also lifts a small infrastructure slice from #37311 (commit
87bbd54d0a) — namely the source_engine
parameter and source_dialect logic on transpile_to_dialect, plus its
three accompanying unit tests. #37311 itself is a feature PR
(import-time virtual-dataset transpilation) that is not desired on
6.0-release; only the plumbing this fix relies on is included.

The source_engine plumbing is required because #39521's call site
passes source_engine=engine to make validate() idempotent on its
second pass: the second invocation re-parses already-transpiled output
that may contain dialect-specific quoting (e.g. MySQL/BigQuery
backticks) which the generic Dialect cannot handle. Without it, the
fix would introduce a new regression on those engines.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 14:42:18 -07:00
Vitor Avila
8e754a1fc9 fix(OpenSearch): OpenSearch dialect for sqlglot (#39538) 2026-04-29 09:12:55 -07:00
Amin Ghadersohi
3cda699864 fix(mcp): handle OAuth-authenticated databases in execute_sql (#39166)
(cherry picked from commit 68067d7f44)
2026-04-13 10:16:49 -07:00
Michael S. Molina
45d2a35ad2 chore(deps): Upgrade sqlglot from 27.15.2 to 28.10.0 (#37841)
(cherry picked from commit c41942a38a)
2026-04-09 14:57:58 -07:00
Amin Ghadersohi
4a04cefef4 fix(mcp): prevent encoding errors and fix tool bugs on MCP client transports (#38786)
(cherry picked from commit ed3c5280a9)
2026-03-24 15:39:33 -07:00
Alexandru Soare
fd9e0c076c fix(firebolt): Firebolt SQL entered with EXCLUDE is rewritten to EXCEPT (#38742)
(cherry picked from commit 6465450b64)
2026-03-20 09:34:34 -07:00
Beto Dealmeida
a8d7481c92 feat: apply RLS conservatively (#38683)
(cherry picked from commit a854fa60a2)
2026-03-17 09:23:50 -07:00
Amin Ghadersohi
b5cbbe86b7 fix(security): Add table blocklist and fix MCP SQL validation bypass (#37411)
(cherry picked from commit 15b3c96f8e)
2026-02-10 16:21:57 -08:00
Beto Dealmeida
1bf0639f40 feat: DB2 dialect for sqlglot (#36365)
(cherry picked from commit e4cb84bc02)
2026-01-26 12:40:49 -08:00
amaannawab923
e08749b9bb feat(ag-grid): add SQLGlot-based SQL escaping for where and having filter clauses (#36136)
(cherry picked from commit 186693b840)
2026-01-26 12:40:48 -08:00
ankitajhanwar2001
81149348f1 fix(sqlglot): use Athena dialect for awsathena parsing (#36747)
(cherry picked from commit d8f7ae83ee)
2026-01-12 14:36:13 -08:00
Evan Rusackas
c5c72bbad7 fix(sql): handle backtick-quoted identifiers with base dialect (#36545)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit c7a4d4f2cc)
2025-12-16 15:25:27 -08:00
Beto Dealmeida
b19372fe16 fix: RLS in virtual datasets (#36061)
(cherry picked from commit f3e620cd0f)
2025-11-14 13:58:26 -08:00
Vitor Avila
6179eb9ef4 fix: Use singlestoredb dialect for sqlglot (#36096)
(cherry picked from commit 6701d0ae0c)
2025-11-13 22:10:06 -08:00
Beto Dealmeida
e4cbc5db4c fix(cache): ensure SQL is sanitized before cache key generation (#35419)
(cherry picked from commit 62dc5c0306)
2025-10-02 10:59:44 -07:00
Beto Dealmeida
e0e8d1d177 fix(pinot): more functions (#35451)
(cherry picked from commit 3202ff4b3f)
2025-10-02 10:57:56 -07:00
Beto Dealmeida
efbfcd737d fix(pinot): SUBSTR function (#35427)
(cherry picked from commit 30021f8ede)
2025-10-02 10:57:00 -07:00
Beto Dealmeida
4c60bd1392 fix(pinot): DATE_SUB function (#35426)
(cherry picked from commit f3349388d0)
2025-10-02 10:56:46 -07:00
Beto Dealmeida
51396f0b94 fix(pinot): DATE_ADD function (#35424)
(cherry picked from commit 5428376662)
2025-10-02 10:56:08 -07:00
Beto Dealmeida
6bb13ef3b4 fix(pinot): dialect date truncation (#35420)
Co-authored-by: bito-code-review[bot] <188872107+bito-code-review[bot]@users.noreply.github.com>
(cherry picked from commit aa97d2fe03)
2025-10-01 13:15:17 -07:00
Beto Dealmeida
94d10af733 fix(pinot): restrict types in dialect (#35337)
(cherry picked from commit bf88d9bb1c)
2025-09-30 13:52:42 -07:00
Beto Dealmeida
927c94306e feat: sqlglot dialect for Pinot (#35333)
(cherry picked from commit 4e093a8e2a)
2025-09-30 10:55:26 -07:00
Evan Rusackas
444b98b95e fix(sql): Add Impala dialect support to sqlglot parser (#34662)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Joe Li <joe@preset.io>
(cherry picked from commit 7fb7ac8bef)
2025-09-04 16:25:30 -07:00
Michael S. Molina
25775504b9 fix: User-provided Jinja template parameters causing SQL parsing errors (#34802)
(cherry picked from commit e1234b2264)
2025-08-23 11:17:15 -07:00
Beto Dealmeida
6fc734da51 fix: prevent anonymous code in Postgres (#34412) 2025-07-31 08:33:34 -04:00
Beto Dealmeida
122bb68e5a fix: subquery alias in RLS (#34374) 2025-07-28 22:58:15 -04:00
Beto Dealmeida
8df5860826 chore: bump sqlglot to latest version (27.3.0) (#34302) 2025-07-24 15:38:29 -07:00
Beto Dealmeida
b794b192d1 fix: return 422 on invalid SQL (#34303) 2025-07-24 16:40:56 -04:00
Beto Dealmeida
efa8cb6fa4 chore: improve sqlglot parsing (#34270) 2025-07-24 10:50:59 -04:00
Beto Dealmeida
5a32777dd0 chore: remove unnecessary disables (#34139) 2025-07-11 11:25:02 -04:00
Đỗ Trọng Hải
1a54b761c1 feat(db): remove Rockset DB support (#33929) 2025-06-27 23:12:54 +07:00
Beto Dealmeida
2cc1ef88c8 chore: use mysql dialect for Pinot (#33848) 2025-06-20 12:11:42 -07:00
Beto Dealmeida
404f7c1043 feat: initial Dremio sqlglot dialect (#33847) 2025-06-20 12:05:45 -07:00
Beto Dealmeida
2f007bf7a5 fix: typo in SQL dialect map (#33727) 2025-06-09 17:03:31 -04:00
Beto Dealmeida
b00660acf1 chore: update sqlglot dialect map (#33701) 2025-06-05 13:14:44 -04:00
Beto Dealmeida
edc60914f6 chore: 100% test coverage for SQL parsing (#33568) 2025-06-04 22:18:09 -04:00
Beto Dealmeida
a26e1d822a chore: remove sqlparse (#33564) 2025-06-04 19:31:41 -04:00
Adalbert Makarovych
ade85daee2 feat(database): add SingleStore engine specification (#32887)
Co-authored-by: Adalbert Makarovych <amakarovych0ua@singlestore.com>
Co-authored-by: Evan Rusackas <evan@preset.io>
2025-06-02 11:50:12 -06:00
Beto Dealmeida
401ce56fa1 feat: use sqlglot to validate adhoc subquery (#33560) 2025-05-30 18:09:19 -04:00
Beto Dealmeida
cf315388f2 feat(sqllab): use sqlglot instead of sqlparse (#33542) 2025-05-30 17:08:19 -04:00
Beto Dealmeida
ea5a609d0b feat: implement CVAS/CTAS in sqlglot (#33525) 2025-05-28 09:45:59 -04:00
Beto Dealmeida
0abe6eed89 feat: implement RLS in sqlglot (#33524) 2025-05-28 09:10:45 -04:00
Beto Dealmeida
e205846845 feat: implement CTEs logic in sqlglot (#33518) 2025-05-28 08:38:00 -04:00
Beto Dealmeida
1393f7d3d2 chore: sql/parse cleanup (#33515) 2025-05-27 16:42:04 -04:00
Beto Dealmeida
8de58b9848 feat: use sqlglot to set limit (#33473) 2025-05-27 15:20:02 -04:00
Beto Dealmeida
adeed60fe0 feat: implement limit extraction in sqlglot (#33456) 2025-05-22 20:09:36 -04:00
Beto Dealmeida
339ba96600 fix: improve function detection (#33306) 2025-05-01 13:45:03 -04:00