Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
Correctness
-
Normal
-
Normal
-
User Report
-
All
-
None
-
Description
Hello Team ,
Facing one issue related to the timestamp type in cassandra 4.0.3 version . This is not repro in 3.11.x and works fine in 3.11.
when i have table with timestamp as fields :
CREATE TABLE timetest (
id int PRIMARY KEY,
enddate timestamp,
startdate timestamp
)
Now when try to insert the record like :
INSERT INTO timetest (id,startdate,enddate) VALUES (1 ,'2022-03-20 12:48:56 +0530','2022-03-20 12:48:56 +0530')
I am receiving error:
"InvalidRequest: Error from server: code=2200 [Invalid query] message="Unable to parse a date/time from '2022-03-20 12:48:56 +0530'".
**
This works fine on 3.11 but fails on 4.x.
same issue if we query the record:
select * from timetest where id = 1 and enddate = '2022-03-20 12:48:56 +0530';
InvalidRequest: Error from server: code=2200 [Invalid query] message="Unable to parse a date/time from '2022-03-20 12:48:56 +0530'"
If we change the timestamp value and remove the extra space which is present before the timezone value then it works fine in 4.x
if we change timestamp value From {'2022-03-20 12:48:56 +0530'} To {'2022-03-20 12:48:56+0530’} then 4.0.3 accept this value otherwise not. but 3.11 was accepting both the values.
This is causing a challenge for upgrading from 3.11 to 4.x.
Seeking help on this issue and any fix / workaround or suitable Cassandra version which is higher than 3.11 but lesser then 4.0.3 which can be used to fix this issue asap.
Attachments
Issue Links
- is broken by
-
CASSANDRA-15976 Incorrect parsing of the timestamp with less than 3 digits in the milliseconds
- Resolved