[error] Exception in thread "main" com.datastax.driver.core.exceptions.InvalidTypeException: Invalid type for value 1 of CQL type timestamp, expecting class java.util.Date but class java.lang.Long provided[error] at com.datastax.driver.core.BoundStatement.bind(BoundStatement.java:190)[error] at com.datastax.driver.core.DefaultPreparedStatement.bind(DefaultPreparedStatement.java:103)[error] at com.netflix.astyanax.cql.direct.DirectCqlPreparedStatement.execute(DirectCqlPreparedStatement.java:43)[error] at CqlTest$.delayedEndpoint$CqlTest$1(CqlTest.scala:58)[error] at CqlTest$delayedInit$body.apply(CqlTest.scala:16)[error] at scala.Function0$class.apply$mcV$sp(Function0.scala:40)[error] at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)[error] at scala.App$$anonfun$main$1.apply(App.scala:76)[error] at scala.App$$anonfun$main$1.apply(App.scala:76)[error] at scala.collection.immutable.List.foreach(List.scala:381)[error] at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)[error] at scala.App$class.main(App.scala:76)[error] at CqlTest$.main(CqlTest.scala:16)[error] at CqlTest.main(CqlTest.scala)
CREATE TABLE concurrent_users (
game TEXT,
time TIMESTAMP,
counter BLOB,
PRIMARY KEY (game, time)
) WITH DEFAULT_TIME_TO_LIVE = 2678400;
val result: Rows[String, String] =
keyspace
.prepareQuery(CF_CONCURRENT_USERS)
.withCql("SELECT * FROM concurrent_users WHERE game = ? and time > ? and time < ? ALLOW FILTERING;")
.asPreparedStatement()
.withStringValue("warriors")
.withLongValue(1409920500000L)
.withLongValue(1409927700000L)
.execute()
.getResult
.getRows
--
You received this message because you are subscribed to the Google Groups "Astyanax Cassandra Client" group.
To unsubscribe from this group and stop receiving emails from it, send an email to astyanax-cassandra...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.