mirror of
https://github.com/apache/superset.git
synced 2026-04-23 18:14:56 +00:00
feat: use sqlglot to validate adhoc subquery (#33560)
This commit is contained in:
@@ -568,6 +568,9 @@ def test_get_samples(test_client, login_as_admin, virtual_dataset):
|
||||
|
||||
|
||||
def test_get_samples_with_incorrect_cc(test_client, login_as_admin, virtual_dataset):
|
||||
if get_example_database().backend == "sqlite":
|
||||
return
|
||||
|
||||
TableColumn(
|
||||
column_name="DUMMY CC",
|
||||
type="VARCHAR(255)",
|
||||
@@ -702,7 +705,7 @@ def test_get_samples_with_multiple_filters(
|
||||
assert "2000-01-02" in rv.json["result"]["query"]
|
||||
assert "2000-01-04" in rv.json["result"]["query"]
|
||||
assert "col3 = 1.2" in rv.json["result"]["query"]
|
||||
assert "col4 is null" in rv.json["result"]["query"]
|
||||
assert "col4 IS NULL" in rv.json["result"]["query"]
|
||||
assert "col2 = 'c'" in rv.json["result"]["query"]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user