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 for aggregation names with dots in first element path of a pipeline aggregation #77481

Merged
merged 4 commits into from
Sep 9, 2021

Conversation

iverase
Copy link
Contributor

@iverase iverase commented Sep 9, 2021

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.

@elasticmachine elasticmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Sep 9, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (Team:Analytics)

@@ -45,6 +45,9 @@
static int numValueBuckets;
static long[] valueCounts;

static String histoName;
static String termsName;

Copy link
Contributor Author

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?

Copy link
Member

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.

Copy link
Member

@not-napoleon not-napoleon left a 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);
Copy link
Member

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;

Copy link
Member

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.

@iverase iverase merged commit 3c6e7a0 into elastic:master Sep 9, 2021
@iverase iverase deleted the suuportDotPipeline branch September 9, 2021 14:05
iverase added a commit that referenced this pull request Sep 9, 2021
…peline aggregation (#77481) (#77501)

This commit changes the strategy during validation is it uses AggregationPath to resolve the name.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Aggregations Aggregations >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v7.16.0 v8.0.0-alpha2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants