-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[BUG] when use "epoch_millis" format for date, got error when sorting in descending order #10253
Comments
This sounds like it's "just" a problem with the formatter. Instead of trying to format the epoch timestamp, we should detect the sentinel missing value (in this case, Long.MIN_VALUE), and format it differently -- either by excluding the field (since it's missing) or maybe we output it as "missing", or something. |
can i take this up if not already taken? |
@afn7081 please do! |
@afn7081 -- Are you still planning to work on this? Thanks! |
Hello @afn7081 I also have this problem, is there any solution? |
I've been digging into this a bit. I believe the underlying problem is an overflow (underflow?) in this expression:
|
I managed to fix it by replacing that line with:
|
Fixes opensearch-project#10253 Signed-off-by: Michael Froh <[email protected]>
Fixes opensearch-project#10253 Signed-off-by: Michael Froh <[email protected]>
…ld (#12676) Fixes #10253 Signed-off-by: Michael Froh <[email protected]>
…ld (#12676) Fixes #10253 Signed-off-by: Michael Froh <[email protected]> (cherry picked from commit fcecd00) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…ld (#12676) (#12681) Fixes #10253 (cherry picked from commit fcecd00) Signed-off-by: Michael Froh <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…ld (opensearch-project#12676) Fixes opensearch-project#10253 Signed-off-by: Michael Froh <[email protected]>
…ld (opensearch-project#12676) Fixes opensearch-project#10253 Signed-off-by: Michael Froh <[email protected]>
…ld (opensearch-project#12676) Fixes opensearch-project#10253 Signed-off-by: Michael Froh <[email protected]> Signed-off-by: Shivansh Arora <[email protected]>
Describe the bug
get error:
{"type":"response_handler_failure_transport_exception","reason":"java.time.DateTimeException: Field EpochMillis cannot be printed as the value -9223372036854775808 cannot be negative according to the SignStyle","caused_by":{"type":"date_time_exception","reason":"Field EpochMillis cannot be printed as the value -9223372036854775808 cannot be negative according to the SignStyle"}}}]},"status":500}
To Reproduce
no issue
when change the order into desc, get below error:
Expected behavior
Plugins
no
Screenshots
Host/Environment (please complete the following information):
Additional context
releated issue :elastic/elasticsearch#52396 (comment)
if use
yyyy-MM-dd
format for field date1, I will getlong overflow
error forasc
order for date1, so I changed it intoepoch_millis
formattested in 2.10.0, still get same error
The text was updated successfully, but these errors were encountered: