-
Notifications
You must be signed in to change notification settings - Fork 310
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
Querying BIGINT
field with Integer
value fails with CodecNotFoundException
#1383
Comments
I'm not quite sure what you're asking for. If you provide a different data type to either Cassandra or the prepared statement, then your query will fail. Codecs are a matter of the Cassandra driver, Spring Data only uses the driver and the codecs. A more lenient approach of the driver, by accepting |
Еhe collective mind from stackoverflow gives an advice to remove @CassandraType annotations. That didn't help in my case. Probably column type update in cassandra can help. For now I don't see possibility to update nested (udt) field value in cassandra through spring data query API: Updating separate field results in Undefined column name:
while I'm using 'data.status' for column name. And I didn't find an option to fix that. Updating whole object:
reports com.datastax.oss.driver.api.core.type.codec.CodecNotFoundException: Codec not found for requested operation: [BIGINT <-> java.lang.Integer] I suppose that is a defect, but probably I'm wrong and that's ok. |
If you change |
BIGINT
field with Integer
value fails with CodecNotFoundException
I'm trying to update cassandra udf field using CassandraOperations update API.
And that results in error:
After adding appropriate codec manually (long <-> BIGINT with java.lang.Integer java type exposed) that code works fine:
where
BigintIntegerCodec
is copy-paste fromcom.datastax.oss.driver.internal.core.type.codec.BigIntCodec
class withjava.lang.Integer
instead ofjava.lang.Long
java type exposed.Cassandra schema:
Here is junit test
The text was updated successfully, but these errors were encountered: