Open MicahZoltu opened 8 years ago
Just as a wild guess, it is probably this: https://github.com/scassandra/scassandra-server/blob/master/server/src/main/scala/org/scassandra/server/cqlmessages/response/PreparedResult.scala#L74-L77? Is the cassandra protocol documented anywhere?
Found the spec, and it appears that I was wrong about the lines that are causing the problem:https://github.com/apache/cassandra/blob/cassandra-2.2/doc/native_protocol_v2.spec#L554-L576
I ran into further trouble trying to actually use this change in my application. It appears that now the prepared execution doesn't match the prepared statement. When I try to execute the prepared statement, after it parses the first part of the message and looks for matching primes it doesn't find one because the stored primes have a variableType.size
of 0. I can change that to also check prime.prime.columnTypes.size
but then when it tries to parse the variables it can't because there aren't any in the prime.
I think I can get past this one with more terrible conditional hacks, but this is all telling me that I am probably doing something wrong.
Hi @Zoltu columns and variables are different so comparing against columsn isn't the right way forward here. What you need to do is use withVariableTypes
which will mean that the variable size check will match.
This results in an exception when calling
setLong
on the bound statementfoo is not a column defined in this metadata
. Looking at the logs, I see the priming include the priming of column foo as BIG_INT but when I callsession.prepare(...)
I don't get back the primed columns:PreparedResultV2(0,5,keyspace,table,List())