-
Notifications
You must be signed in to change notification settings - Fork 97
making range aggregation untagged union #2725
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
Conversation
compiler/src/steps/validate-model.ts
Outdated
@@ -610,6 +610,7 @@ export default async function validateModel (apiModel: model.Model, restSpec: Ma | |||
} else if (variants.kind === 'untagged') { | |||
if (fqn(parentName) !== '_types.query_dsl:DecayFunction' && | |||
fqn(parentName) !== '_types.query_dsl:DistanceFeatureQuery' && | |||
fqn(parentName) !== '_types.aggregations:AggregationRange' && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Let's keep the names in alphabetical order please :-)
export type AggregationRange = | ||
| UntypedAggregationRange | ||
| NumberAggregationRange | ||
| StringAggregationRange |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's check, if we can have "term" range aggregations and if yes, rename this variant to TermAggregationRange.
We as well most likely want to have either a Date- or even a DateMath variant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DateRangeAggregation can be part of the union yes. so untyped | number | term | date, like range query?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just noticed that DateRangeAggregation, like IpRangeAggregation, has its own field in the AggregationContainer (date_range
). does it make sense to also add it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
985e70b
to
5b89c6e
Compare
* making range aggregation untagged union * same as range query * removed term range aggregation * Revert "removed term range aggregation" This reverts commit 1f832ef. * rebase fix (cherry picked from commit 231aa47) Co-authored-by: Laura Trotta <[email protected]>
…4244) (cherry picked from commit bd62fe3) Co-authored-by: Laura Trotta <[email protected]>
fixes #2641
draft for now because I still have to figure out if we're mapping the responses right