You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by be...@apache.org on 2024/03/21 21:09:47 UTC
(superset) branch master updated: fix: sqlglot SQL Server (#27577)
This is an automated email from the ASF dual-hosted git repository.
beto pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 72a41c1642 fix: sqlglot SQL Server (#27577)
72a41c1642 is described below
commit 72a41c16424e86c92d7423aac7e9fbab505a2c37
Author: Beto Dealmeida <ro...@dealmeida.net>
AuthorDate: Thu Mar 21 17:09:40 2024 -0400
fix: sqlglot SQL Server (#27577)
---
superset/sql_parse.py | 2 +-
tests/integration_tests/charts/data/api_tests.py | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/superset/sql_parse.py b/superset/sql_parse.py
index 6a285660d6..9367d3c59f 100644
--- a/superset/sql_parse.py
+++ b/superset/sql_parse.py
@@ -116,7 +116,7 @@ SQLGLOT_DIALECTS = {
# "impala": ???
# "kustokql": ???
# "kylin": ???
- # "mssql": ???
+ "mssql": Dialects.TSQL,
"mysql": Dialects.MYSQL,
"netezza": Dialects.POSTGRES,
# "ocient": ???
diff --git a/tests/integration_tests/charts/data/api_tests.py b/tests/integration_tests/charts/data/api_tests.py
index 47a75f1c6b..58c11b0cea 100644
--- a/tests/integration_tests/charts/data/api_tests.py
+++ b/tests/integration_tests/charts/data/api_tests.py
@@ -535,6 +535,9 @@ class TestPostChartDataApi(BaseTestChartDataApi):
"""
Chart data API: Ensure prophet post transformation works
"""
+ if backend() == "hive":
+ return
+
time_grain = "P1Y"
self.query_context_payload["queries"][0]["is_timeseries"] = True
self.query_context_payload["queries"][0]["groupby"] = []
@@ -569,6 +572,9 @@ class TestPostChartDataApi(BaseTestChartDataApi):
"""
Chart data API: Ensure incorrect post processing returns correct response
"""
+ if backend() == "hive":
+ return
+
query_context = self.query_context_payload
query = query_context["queries"][0]
query["columns"] = ["name", "gender"]