-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Support BucketScript paths of type string and array. #44694
Conversation
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 a minor comment, LGTM otherwise
.endObject() | ||
.endObject(); | ||
BucketScriptPipelineAggregationBuilder builder1 = BucketScriptPipelineAggregationBuilder.parse("count", createParser(content)); | ||
assertEquals(builder1.getBucketsPaths().length , 1); |
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.
maybe check the content too ?
.endObject() | ||
.endObject(); | ||
BucketScriptPipelineAggregationBuilder builder2 = BucketScriptPipelineAggregationBuilder.parse("count", createParser(content)); | ||
assertEquals(builder2.getBucketsPaths().length , 2); |
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.
same here
@elasticmachine run elasticsearch-ci/1 elasticsearch-ci/2 |
@elasticmachine run elasticsearch-ci/2 |
1 similar comment
@elasticmachine run elasticsearch-ci/2 |
Thanks for putting this up. I will verify this also resolves our issue in Kibana. |
Verified Kibana CI is passing with these changes: elastic/kibana#41701 (comment) |
@tylersmalley Thanks for checking! PR has been merged in master and 7.x. |
In #44385 the BucketScript parser was refactor to make it static. Unfortunately this action break some behaviour, in particular it is not able to parse paths defined as a String or an array. This PR gives back that ability.