Skip to content

Fix CalendarInterval year alias #2026

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

Merged
merged 2 commits into from
Jun 20, 2024
Merged

Conversation

esdrasbrz
Copy link
Contributor

@esdrasbrz esdrasbrz commented Mar 7, 2023

This PR fixes the AggregationsCalendarInterval type with 1y instead of 1Y. ElasticSearch 8.6 returns the following error when 1Y is used:

{
  "error": {
    "root_cause": [
      {
        "type": "x_content_parse_exception",
        "reason": "[41:30] [date_histogram] failed to parse field [calendar_interval]"
      }
    ],
    "type": "x_content_parse_exception",
    "reason": "[41:30] [date_histogram] failed to parse field [calendar_interval]",
    "caused_by": {
      "type": "illegal_argument_exception",
      "reason": "The supplied interval [1Y] could not be parsed as a calendar interval."
    }
  },
  "status": 400
}

Also, from the docs, the correct interval is 1y

Closes #2627

@esdrasbrz esdrasbrz marked this pull request as ready for review March 7, 2023 01:45
@esdrasbrz
Copy link
Contributor Author

I'm not sure about the backports. It seems it needs backports as the API is only partially usable, but I can't change the PR labels.
LMK if there's something else I need to do.

Copy link
Member

@pquentin pquentin left a comment

Choose a reason for hiding this comment

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

Great catch, thank you! And sorry for being so terribly late.

@pquentin pquentin merged commit 1facd23 into elastic:main Jun 20, 2024
14 of 15 checks passed
github-actions bot pushed a commit that referenced this pull request Jun 20, 2024
Co-authored-by: Quentin Pradet <quentin.pradet@elastic.co>
(cherry picked from commit 1facd23)
github-actions bot pushed a commit that referenced this pull request Jun 20, 2024
Co-authored-by: Quentin Pradet <quentin.pradet@elastic.co>
(cherry picked from commit 1facd23)
@esdrasbrz esdrasbrz deleted the fix/calendar-interval branch June 20, 2024 12:05
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.

2 participants