Tomasz Bartczak created CASSANDRA-9629:
------------------------------------------

             Summary: Error when reading date after altering column
                 Key: CASSANDRA-9629
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9629
             Project: Cassandra
          Issue Type: Bug
            Reporter: Tomasz Bartczak


Having a table with timestamp column and a prepared statement for it - after 
altering the table with new column - reading date values are broken.

{code}
com.datastax.driver.core.exceptions.InvalidTypeException: Invalid 64-bits long 
value, expecting 8 bytes but got 1
        at 
com.datastax.driver.core.TypeCodec$LongCodec.deserializeNoBoxing(TypeCodec.java:452)
        at 
com.datastax.driver.core.TypeCodec$DateCodec.deserialize(TypeCodec.java:826)
        at 
com.datastax.driver.core.AbstractGettableByIndexData.getDate(AbstractGettableByIndexData.java:155)
        at 
com.datastax.driver.core.AbstractGettableData.getDate(AbstractGettableData.java:26)
        at 
com.datastax.driver.core.AbstractGettableData.getDate(AbstractGettableData.java:99)
        at 
CassandraAlterTable$delayedInit$body.apply(CassandraAlterTable.scala:19)
        at scala.Function0$class.apply$mcV$sp(Function0.scala:40)
        at 
scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
        at scala.App$$anonfun$main$1.apply(App.scala:71)
        at scala.App$$anonfun$main$1.apply(App.scala:71)
        at scala.collection.immutable.List.foreach(List.scala:318)
        at 
scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:32)
        at scala.App$class.main(App.scala:71)
        at CassandraAlterTable$.main(CassandraAlterTable.scala:8)
        at CassandraAlterTable.main(CassandraAlterTable.scala)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
{code}

This bug is reproduced in : https://github.com/kretes/cassandra-alter



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to