feat: old Firebolt dialect (#31849)

This commit is contained in:
Beto Dealmeida
2025-01-15 09:02:37 -05:00
committed by GitHub
parent 754ccd0448
commit 4ca5846c7f
6 changed files with 149 additions and 5 deletions

View File

@@ -1146,3 +1146,21 @@ SELECT
FROM tbl
""".strip()
)
def test_firebolt_old() -> None:
"""
Test the dialect for the old Firebolt syntax.
"""
from superset.sql.dialects import FireboltOld
from superset.sql.parse import SQLGLOT_DIALECTS
SQLGLOT_DIALECTS["firebolt"] = FireboltOld
sql = "SELECT * FROM t1 UNNEST(col1 AS foo)"
assert (
SQLStatement(sql, "firebolt").format()
== """SELECT
*
FROM t1 UNNEST(col1 AS foo)"""
)