Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
OpenSearch version 1.3 onwards
Describe the issue:
When inserting documents with value as -561600000
( Milliseconds of 1969/12/25 12:00:00 PM GMT) into date field. Getting below error,
failed to parse field [column1] of type [date] in document with id ‘800d6acc-9192-4bb1-b2cb-c810b77f179e’. Preview of field’s value: ‘-561600000’",“caused_by”:{“type”:“arithmetic_exception”,“reason”:“arithmetic_exception: long overflow”}}, “status”:400
But successfully inserting -561600000000
( Milliseconds of 1952/03/16 12:00:00 AM GMT). This seems inconsistent behavior where not allowing date value close to 1969’s but allowing 1950’s value.
Note: ElasticSearch don’t have this issue. Able to store -561600000
value successfully. Noticed this behavior change when migrating from ES to OpenSearch.
Any work around to this fix? Better to have consistent behavior when storing negative milliseconds.
Configuration:
Index created with OpenSearch 1.3.x.
Mapping for this column: "column1":{"type":"date"}
NOTE: not using any custom format types.
Relevant Logs or Screenshots:
failed to parse field [column1] of type [date] in document with id ‘800d6acc-9192-4bb1-b2cb-c810b77f179e’. Preview of field’s value: ‘-561600000’",“caused_by”:{“type”:“arithmetic_exception”,“reason”:“arithmetic_exception: long overflow”}}, “status”:400