add having_druid back into the schema (#20879)

This commit is contained in:
Elizabeth Thompson 2022-07-26 17:54:46 -07:00 committed by GitHub
parent d327437462
commit cd578d2865
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -851,6 +851,12 @@ class ChartDataExtrasSchema(Schema):
description="HAVING clause to be added to aggregate queries using "
"AND operator.",
)
having_druid = fields.List(
fields.Nested(ChartDataFilterSchema),
description="HAVING filters to be added to legacy Druid datasource queries. "
"This field is deprecated",
deprecated=True,
)
time_grain_sqla = fields.String(
description="To what level of granularity should the temporal column be "
"aggregated. Supports "

View File

@ -22,7 +22,7 @@ from superset.common.chart_data import ChartDataResultType
from superset.utils.core import AnnotationType, DTTM_ALIAS
query_birth_names = {
"extras": {"where": "", "time_grain_sqla": "P1D"},
"extras": {"where": "", "time_grain_sqla": "P1D", "having_druid": []},
"columns": ["name"],
"metrics": [{"label": "sum__num"}],
"orderby": [("sum__num", False)],