Repository navigation
Catch DateTimeException in EsqlDataTypeConverter - #137744
Conversation
|
I'm not familiar with ESQL to know how this should be tested |
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
|
Hi @thecoop, I've created a changelog YAML for you. |
|
Thanks for the fix! About testing, 2 ways (we usually do both:
It should automatically test both folding and runtime evaluating cases. Then, we would add a CSV test with the failing query (Like Also, these affect multiple code paths, which are used by multiple functions too:
Those are the ones I found at least, maybe you can track some other important code. It would be nice to have both unit tests and CSV tests for them. About the fix per se, should we have the check inside the DateFormatter class/sub-class? I think that would fix the ToDateNanos case too, but not sure. |
|
|
|
I've added a few tests - not sure how thorough this needs to be though |
carlosdelest
left a comment
There was a problem hiding this comment.
LGTM, thanks for the fix!
DateTimeExceptionis not a fatal exception, it is an input error, so convert it toIllegalArgumentExceptionFixes #137741