-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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 for aggregation names with dots in first element path of a pipeline aggregation #77481
Conversation
…peline aggregation
Pinging @elastic/es-analytics-geo (Team:Analytics) |
@@ -45,6 +45,9 @@ | |||
static int numValueBuckets; | |||
static long[] valueCounts; | |||
|
|||
static String histoName; | |||
static String termsName; | |||
|
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 have only do it for one test but maybe we should do it for all of them for consistency? Maybe a follow up PR?
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.
Yeah, I think that'd be good to do in a follow up PR.
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
private static String randomName() { | ||
return randomBoolean() | ||
? randomAlphaOfLengthBetween(3, 12) | ||
: randomAlphaOfLengthBetween(3, 6) + "." + randomAlphaOfLengthBetween(3, 6); |
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.
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.
@@ -45,6 +45,9 @@ | |||
static int numValueBuckets; | |||
static long[] valueCounts; | |||
|
|||
static String histoName; | |||
static String termsName; | |||
|
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.
Yeah, I think that'd be good to do in a follow up PR.
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
AggregationPath
to resolve the name.