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

"Unparseable number" exception when missing is used with format in terms agg #67197

Closed
imotov opened this issue Jan 7, 2021 · 1 comment · Fixed by #67954
Closed

"Unparseable number" exception when missing is used with format in terms agg #67197

imotov opened this issue Jan 7, 2021 · 1 comment · Fixed by #67954
Labels
:Analytics/Aggregations Aggregations >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)

Comments

@imotov
Copy link
Contributor

imotov commented Jan 7, 2021

Reproduces with both 7.x and master:

DELETE test?ignore_unavailable=true

POST test/_bulk?refresh
{"index":{}}
{"val": 1}


POST test/_search
{
  "size": 10, 
  "aggs": {
    "test": {
      "terms": {
        "field": "val",
        "format": "test ###.0#",
        "size": 10,
        "missing": 42
      }
    }
  }
}

The error:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "parse_exception",
        "reason" : "parse_exception: Unparseable number: \"42\""
      }
    ],
    "type" : "search_phase_execution_exception",
    "reason" : "all shards failed",
    "phase" : "query",
    "grouped" : true,
    "failed_shards" : [
      {
        "shard" : 0,
        "index" : "test",
        "node" : "0inRi1i0RIiutV9RuJiNlg",
        "reason" : {
          "type" : "runtime_exception",
          "reason" : "runtime_exception: java.text.ParseException: Unparseable number: \"42\"",
          "caused_by" : {
            "type" : "parse_exception",
            "reason" : "parse_exception: Unparseable number: \"42\""
          }
        }
      }
    ],
    "caused_by" : {
      "type" : "parse_exception",
      "reason" : "parse_exception: Unparseable number: \"42\""
    }
  },
  "status" : 500
}
@elasticmachine elasticmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Jan 7, 2021
@elasticmachine
Copy link
Collaborator

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

imotov added a commit to imotov/elasticsearch that referenced this issue Jan 25, 2021
Removes unnecessary and confusing roundtrip that missing values are undertaking
in the terms agg if they are already specified as numbers. It also improves a
somewhat confusing error message when the missing value cannot be parsed
according to the specified format.

Closes elastic#67197
imotov added a commit that referenced this issue Jan 26, 2021
)

Removes unnecessary and confusing roundtrip that missing values are undertaking
in the terms agg if they are already specified as numbers. It also improves a
somewhat confusing error message when the missing value cannot be parsed
according to the specified format.

Closes #67197
imotov added a commit that referenced this issue Jan 26, 2021
) (#68014)

Removes unnecessary and confusing roundtrip that missing values are undertaking
in the terms agg if they are already specified as numbers. It also improves a
somewhat confusing error message when the missing value cannot be parsed
according to the specified format.

Closes #67197
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)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants