Skip to content

use internal aggregation range class for date aggregation ranges #2897

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

Merged
Merged
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
12 changes: 6 additions & 6 deletions utils/dsl-generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,12 +345,12 @@ def get_python_type(self, schema_type, for_response=False):
]["name"].endswith("Analyzer"):
# not expanding analyzers at this time, maybe in the future
return "str, Dict[str, Any]", None
elif (
schema_type["name"]["namespace"] == "_types.aggregations"
and schema_type["name"]["name"].endswith("AggregationRange")
and schema_type["name"]["name"] != "IpRangeAggregationRange"
):
return '"wrappers.AggregationRange"', None
elif schema_type["name"]["namespace"] == "_types.aggregations":
if (
schema_type["name"]["name"].endswith("AggregationRange")
or schema_type["name"]["name"] == "DateRangeExpression"
) and schema_type["name"]["name"] != "IpRangeAggregationRange":
return '"wrappers.AggregationRange"', None

# to handle other interfaces we generate a type of the same name
# and add the interface to the interfaces.py module
Expand Down
Loading