Skip to content

[8.x] [ESQL] Enable "any type" aggregations on Date Nanos (#114438)#115558

Merged
elasticsearchmachine merged 2 commits intoelastic:8.xfrom
not-napoleon:backport-114438-to-8.x
Oct 24, 2024
Merged

[8.x] [ESQL] Enable "any type" aggregations on Date Nanos (#114438)#115558
elasticsearchmachine merged 2 commits intoelastic:8.xfrom
not-napoleon:backport-114438-to-8.x

Conversation

@not-napoleon
Copy link
Copy Markdown
Member

Resolves #110002
Resolves #110003
Resolves #110005

Enable Values, Count, CountDistinct, Min and Max aggregations on date nanos. In the course of addressing this, I had to make some changes to AggregateMapper where it maps types into string names. I tried to refactor this once before (#110841) but at the time we decided not to go ahead with it. That bit me while working on this, and so I am trying again to refactor it. This time I've made a more localized change, just replacing the cascading if block with a switch. That will cause a compile time failure when future new data types are added, unless they correctly update this section.

I've also done a small refactoring on the aggregators themselves, to make the supplier function consistent with the typeResolution.

Resolves elastic#110002
Resolves elastic#110003
Resolves elastic#110005

Enable Values, Count, CountDistinct, Min and Max aggregations on date nanos. In the course of addressing this, I had to make some changes to AggregateMapper where it maps types into string names. I tried to refactor this once before (elastic#110841) but at the time we decided not to go ahead with it. That bit me while working on this, and so I am trying again to refactor it. This time I've made a more localized change, just replacing the cascading if block with a switch. That will cause a compile time failure when future new data types are added, unless they correctly update this section.

I've also done a small refactoring on the aggregators themselves, to make the supplier function consistent with the typeResolution.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@not-napoleon not-napoleon added backport auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) test-release Trigger CI checks against release build :Analytics/ES|QL AKA ESQL v8.17.0 labels Oct 24, 2024
@elasticsearchmachine elasticsearchmachine merged commit 33f4b38 into elastic:8.x Oct 24, 2024
@not-napoleon not-napoleon deleted the backport-114438-to-8.x branch October 24, 2024 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport test-release Trigger CI checks against release build v8.17.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants