Skip to content

Add support for list<timestamp> #77

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

Closed
tprocter opened this issue Feb 28, 2025 · 1 comment
Closed

Add support for list<timestamp> #77

tprocter opened this issue Feb 28, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@tprocter
Copy link

Using version 4.14.0, if a cassandra table has a list field, I'm unable to extract the value from a resultset.

-- Create the table
CREATE TABLE example_table (
    id UUID PRIMARY KEY,
    event_timestamps list<timestamp>
);

-- Insert an example row
INSERT INTO example_table (id, event_timestamps)
VALUES (uuid(), [toTimestamp(now()), toTimestamp(now() - 86400000)]);

final ResultSet resultSet = statement.executeQuery("SELECT * FROM example_table ;");
resultSet.next();

resultSet.getObject(columnName);
com.datastax.oss.driver.api.core.type.codec.CodecNotFoundException: Codec not found for requested operation: [TIMESTAMP <-> java.sql.Timestamp]
  at com.datastax.oss.driver.internal.core.type.codec.registry.CachingCodecRegistry.createCodec(CachingCodecRegistry.java:656)
  at com.datastax.oss.driver.internal.core.type.codec.registry.DefaultCodecRegistry$1.load(DefaultCodecRegistry.java:95)
  at com.datastax.oss.driver.internal.core.type.codec.registry.DefaultCodecRegistry$1.load(DefaultCodecRegistry.java:92)
  at com.datastax.oss.driver.shaded.guava.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
  at com.datastax.oss.driver.shaded.guava.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2276)
  at com.datastax.oss.driver.shaded.guava.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2154)
  at com.datastax.oss.driver.shaded.guava.common.cache.LocalCache$Segment.get(LocalCache.java:2044)
  at com.datastax.oss.driver.shaded.guava.common.cache.LocalCache.get(LocalCache.java:3951)
  at com.datastax.oss.driver.shaded.guava.common.cache.LocalCache.getOrLoad(LocalCache.java:3973)
  at com.datastax.oss.driver.shaded.guava.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4957)
  at com.datastax.oss.driver.shaded.guava.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4963)
  at com.datastax.oss.driver.internal.core.type.codec.registry.DefaultCodecRegistry.getCachedCodec(DefaultCodecRegistry.java:117)
  at com.datastax.oss.driver.internal.core.type.codec.registry.CachingCodecRegistry.codecFor(CachingCodecRegistry.java:190)
  at com.datastax.oss.driver.internal.core.type.codec.registry.CachingCodecRegistry.getElementCodecForCqlAndJavaType(CachingCodecRegistry.java:587)
  at com.datastax.oss.driver.internal.core.type.codec.registry.CachingCodecRegistry.createCodec(CachingCodecRegistry.java:615)
  at com.datastax.oss.driver.internal.core.type.codec.registry.DefaultCodecRegistry$1.load(DefaultCodecRegistry.java:95)
  at com.datastax.oss.driver.internal.core.type.codec.registry.DefaultCodecRegistry$1.load(DefaultCodecRegistry.java:92)
  at com.datastax.oss.driver.shaded.guava.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
  at com.datastax.oss.driver.shaded.guava.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2276)
  at com.datastax.oss.driver.shaded.guava.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2154)
  at com.datastax.oss.driver.shaded.guava.common.cache.LocalCache$Segment.get(LocalCache.java:2044)
  at com.datastax.oss.driver.shaded.guava.common.cache.LocalCache.get(LocalCache.java:3951)
  at com.datastax.oss.driver.shaded.guava.common.cache.LocalCache.getOrLoad(LocalCache.java:3973)
  at com.datastax.oss.driver.shaded.guava.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4957)
  at com.datastax.oss.driver.shaded.guava.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4963)
  at com.datastax.oss.driver.internal.core.type.codec.registry.DefaultCodecRegistry.getCachedCodec(DefaultCodecRegistry.java:117)
  at com.datastax.oss.driver.internal.core.type.codec.registry.CachingCodecRegistry.codecFor(CachingCodecRegistry.java:190)
  at com.datastax.oss.driver.internal.core.type.codec.registry.CachingCodecRegistry.codecFor(CachingCodecRegistry.java:169)
  at com.datastax.oss.driver.api.core.data.GettableByIndex.get(GettableByIndex.java:107)
  at com.datastax.oss.driver.api.core.data.GettableByIndex.getList(GettableByIndex.java:499)
  at com.datastax.oss.driver.api.core.data.GettableByName.getList(GettableByName.java:580)
  at com.ing.data.cassandra.jdbc.CassandraResultSet.getObject(CassandraResultSet.java:1066)
@maximevw maximevw added the to investigate Investigation needed label Feb 28, 2025
@maximevw maximevw added the bug Something isn't working label Mar 8, 2025
@maximevw
Copy link
Collaborator

Hello @tprocter

Sorry for the delay. This has been fixed in the commit 2ea6432 and it will be included into the next release 4.15.0 coming soon.

@maximevw maximevw removed the to investigate Investigation needed label Mar 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants