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

Work around ESQL query parsing bug #748

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

gbanasiak
Copy link
Contributor

After elastic/elasticsearch#121948 we're seeing the following error:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "parsing_exception",
        "reason" : "line 1:327: no viable alternative at input 'avg(kubernetes.pod.cpu.usage.limit'"
      }
    ],
    "type" : "parsing_exception",
    "reason" : "line 1:327: no viable alternative at input 'avg(kubernetes.pod.cpu.usage.limit'",
    "caused_by" : {
      "type" : "no_viable_alt_exception",
      "reason" : null
    }
  },
  "status" : 400
}

This PR is a workaround until elastic/elasticsearch#123085 is in.

@gbanasiak gbanasiak requested review from ChrisHegarty and a team February 21, 2025 11:53
@gbanasiak
Copy link
Contributor Author

Empirically STATS percentile(kubernetes.container.cpu.usage.nanocores, 95) modification was not required but I've changed it for completeness. I don't know what are the exact conditions that trigger, is just the limit keyword?

@ChrisHegarty
Copy link

Empirically STATS percentile(kubernetes.container.cpu.usage.nanocores, 95) modification was not required but I've changed it for completeness. I don't know what are the exact conditions that trigger, is just the limit keyword?

The issue is specifically with limit and sort (only).

Copy link

@ChrisHegarty ChrisHegarty left a comment

Choose a reason for hiding this comment

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

LGTM. And of course this can be reverted once the issue is fixed in Elasticsearch.

@gbanasiak
Copy link
Contributor Author

The issue is specifically with limit and sort (only).

Thanks for clarifying. I went too far initially, will go for the minimum change required.

@gbanasiak gbanasiak merged commit 1d080fd into elastic:master Feb 21, 2025
13 checks passed
@gbanasiak gbanasiak deleted the workaround-esql-bug branch February 21, 2025 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants