Skip to content

fixed negative year range for default date type formate #17794

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

kbharathy
Copy link

Description

Negative epoch millis with certain length, results with parsing exception for fields using default format ("strict_date_optional_time||epoch_millis").

negative values(-561600000, -5616000000) are parsed incorrectly with default format "strict_date_optional_time||epoch_millis".
with error message,
java.lang.ArithmeticException: long overflow

negative values(-2177434800) are parsed incorrectly with default format "strict_date_optional_time||epoch_millis"
with error message,
java.time.DateTimeException: Invalid value for Year (valid values -999999999 - 999999999): -2177434800

Fixed by reducing length from 10 to 4 - Helped to parse values correctly now.

Related Issues

Resolves #16979

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link
Contributor

github-actions bot commented Apr 4, 2025

❌ Gradle check result for 3e639bc: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Apr 4, 2025

❌ Gradle check result for 29ddfb5: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: kbharathy <[email protected]>
Copy link
Contributor

✅ Gradle check result for 828da70: SUCCESS

Copy link

codecov bot commented Apr 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.38%. Comparing base (5ec96c5) to head (828da70).
Report is 73 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #17794      +/-   ##
============================================
+ Coverage     72.35%   72.38%   +0.03%     
+ Complexity    66054    66049       -5     
============================================
  Files          5358     5358              
  Lines        306485   306496      +11     
  Branches      44406    44406              
============================================
+ Hits         221763   221868     +105     
+ Misses        66538    66432     -106     
- Partials      18184    18196      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Indexing Indexing, Bulk Indexing and anything related to indexing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Parsing exception while storing negative epoch millis with certain length.
1 participant