Support for aggregation names with dots in first element path of a pipeline aggregation#77481
Merged
iverase merged 4 commits intoelastic:masterfrom Sep 9, 2021
Merged
Conversation
…peline aggregation
Collaborator
|
Pinging @elastic/es-analytics-geo (Team:Analytics) |
iverase
commented
Sep 9, 2021
|
|
||
| static String histoName; | ||
| static String termsName; | ||
|
|
Contributor
Author
There was a problem hiding this comment.
I have only do it for one test but maybe we should do it for all of them for consistency? Maybe a follow up PR?
Member
There was a problem hiding this comment.
Yeah, I think that'd be good to do in a follow up PR.
not-napoleon
approved these changes
Sep 9, 2021
| private static String randomName() { | ||
| return randomBoolean() | ||
| ? randomAlphaOfLengthBetween(3, 12) | ||
| : randomAlphaOfLengthBetween(3, 6) + "." + randomAlphaOfLengthBetween(3, 6); |
Member
There was a problem hiding this comment.
We should test non-ascii characters too, probably in a follow up PR. Or just open a ticket for it, could be a good first issue for someone.
|
|
||
| static String histoName; | ||
| static String termsName; | ||
|
|
Member
There was a problem hiding this comment.
Yeah, I think that'd be good to do in a follow up PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the first element on the path of a pipeline aggregation refers to an aggregation with a name containing a dot, the aggregation fails as it does not save properly the aggregation name during validation. This is due that the validation it's own parsing strategy that cannot deal with such names.
This PR changes the strategy during validation is it uses
AggregationPathto resolve the name.