Skip to content
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

Getting issue while inserting date #26

Open
vinay-500 opened this issue May 29, 2020 · 2 comments
Open

Getting issue while inserting date #26

vinay-500 opened this issue May 29, 2020 · 2 comments

Comments

@vinay-500
Copy link

vinay-500 commented May 29, 2020

Caused by: com.datastax.driver.core.exceptions.InvalidQueryException: Expected 8 or 0 byte long for date (24)
at com.datastax.driver.core.Responses$Error.asException(Responses.java:181) ~[cassandra-driver-core-3.7.2.jar:?]
at com.datastax.driver.core.DefaultResultSetFuture.onSet(DefaultResultSetFuture.java:215) ~[cassandra-driver-core-3.7.2.jar:?]

when i debug query is prepared like this in CassandraProducer
column:- recording_date
type:- timestamp

INSERT INTO heatmap_results (id,event_type,event_source,day,hr,minute,second,year,month,x,y,date_of_month,recording_date) VALUES (1590733711490,'4','undefined','Wednesday',1,39,4,2020,3,0,0,1,'2020-03-31T20:09:04.618Z')

Same query working in cli, but not from code.

Update:-
session.execute(insert) -> session.execute(insert.toString()) --- it's working.

@oscerd
Copy link
Owner

oscerd commented May 29, 2020

What version are you using?

@vinay-500
Copy link
Author

vinay-500 commented May 29, 2020

What version are you using?

3.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants