mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
fix(sqla): avoid unnecessary groupby for when no metrics (#18579)
This commit is contained in:
@@ -154,6 +154,7 @@ class TestPostChartDataApi(BaseTestChartDataApi):
|
||||
|
||||
# assert
|
||||
self.assert_row_count(rv, expected_row_count)
|
||||
assert "GROUP BY" not in rv.json["result"][0]["query"]
|
||||
|
||||
@pytest.mark.usefixtures("load_birth_names_dashboard_with_slices")
|
||||
@mock.patch(
|
||||
@@ -184,6 +185,7 @@ class TestPostChartDataApi(BaseTestChartDataApi):
|
||||
|
||||
# assert
|
||||
self.assert_row_count(rv, expected_row_count)
|
||||
assert "GROUP BY" not in rv.json["result"][0]["query"]
|
||||
|
||||
@pytest.mark.usefixtures("load_birth_names_dashboard_with_slices")
|
||||
@mock.patch(
|
||||
@@ -200,6 +202,7 @@ class TestPostChartDataApi(BaseTestChartDataApi):
|
||||
|
||||
# assert
|
||||
self.assert_row_count(rv, expected_row_count)
|
||||
assert "GROUP BY" not in rv.json["result"][0]["query"]
|
||||
|
||||
def test_with_incorrect_result_type__400(self):
|
||||
self.query_context_payload["result_type"] = "qwerty"
|
||||
|
||||
Reference in New Issue
Block a user