-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Removes toString->parse roundtrip for missing value in terms agg #67954
Conversation
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
Pinging @elastic/es-analytics-geo (Team:Analytics) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes me happy.
@@ -454,7 +454,7 @@ public double parseDouble(String value, boolean roundUp, LongSupplier now) { | |||
try { | |||
n = format.parse(value); | |||
} catch (ParseException e) { | |||
throw new RuntimeException(e); | |||
throw new RuntimeException("Cannot parse the value [" + value + "] using the pattern [" + pattern + "]"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add , e
just so we don't lose it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, good catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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