Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add having_druid back into the chart schema #20879

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions superset/charts/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down
2 changes: 1 addition & 1 deletion tests/common/query_context_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
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)],
Expand Down