-
Notifications
You must be signed in to change notification settings - Fork 152
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
Aggregation filters #5879
Aggregation filters #5879
Conversation
🦋 Changeset detectedLatest commit: 8fcfe20 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
2533b0f
to
c11f69d
Compare
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.
Left some comments but apart of that it looks great!
case "equals": | ||
case "eq": | ||
return "EQUAL"; | ||
case "lessThan": // TODO: remove long syntax once tests have been updated |
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.
This has already been removed!
@@ -608,6 +613,29 @@ export class FilterFactory { | |||
throw new Error(`Invalid operator ${key}`); | |||
} | |||
} | |||
private parseGenericOperatorForAggregation(key: string): AggregationLogicalOperator { |
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.
I believe we can reuse parseGenericOperator
!
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.
These are not the same filters, even if they have the same name, the typings are defined to use one or the other, and I rather keep the nice typings
@@ -919,4 +987,27 @@ export class FilterFactory { | |||
} | |||
return targetPoint; | |||
} | |||
|
|||
private parsedGenericAggregationOperator(key: string): AggregationOperator { |
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.
private parsedGenericAggregationOperator(key: string): AggregationOperator { | |
private parseGenericAggregationOperator(key: string): AggregationOperator { |
Description
Add generic filters for aggregations: