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

Support BucketScript paths of type string and array. #44694

Merged
merged 2 commits into from
Jul 23, 2019

Conversation

iverase
Copy link
Contributor

@iverase iverase commented Jul 22, 2019

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.

Copy link
Contributor

@jimczi jimczi left a 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);
Copy link
Contributor

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

@iverase
Copy link
Contributor Author

iverase commented Jul 22, 2019

@elasticmachine run elasticsearch-ci/1 elasticsearch-ci/2

@iverase
Copy link
Contributor Author

iverase commented Jul 22, 2019

@elasticmachine run elasticsearch-ci/2

1 similar comment
@iverase
Copy link
Contributor Author

iverase commented Jul 22, 2019

@elasticmachine run elasticsearch-ci/2

@tylersmalley
Copy link
Contributor

Thanks for putting this up. I will verify this also resolves our issue in Kibana.

@tylersmalley
Copy link
Contributor

Verified Kibana CI is passing with these changes: elastic/kibana#41701 (comment)

@iverase iverase merged commit 02ff060 into elastic:master Jul 23, 2019
iverase added a commit to iverase/elasticsearch that referenced this pull request Jul 23, 2019
@iverase iverase deleted the fixBucketScriptPath branch July 23, 2019 07:06
@iverase
Copy link
Contributor Author

iverase commented Jul 23, 2019

@tylersmalley Thanks for checking! PR has been merged in master and 7.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants