Hello,
I think I found an issue with Quill (http://getquill.io/) vs SCassandra. Quill is using a mapping function and applies to that to case class. E.g "case class Token(user_id: String. used: Boolean)". When i now try to return a row in a test i try todo this:
PrimingRequest.queryBuilder()
.withQuery("SELECT user_id, used from TOKENS")
.withRows(row)
.build();
where row is:
Map[String, Any](
"used" -> false,
"user_id" -> "b94133a3-e35d-4c94-9463-d806a64afd71"
)
For some reason it seems that the order is than flipped around randomly. My assume is that there is some kind of "iterator" which is not respecting the insertion order. I managed to switch to ListMap on client - side and regarding to the logs its fine. But according to the server-response the order is been flipped:
Client:
[debug] - org.apache.http.wire - http-outgoing-0 >> "{"when":{"query":"SELECT user_id, used from TOKENS"},"then":{"variable_types":[],"rows":[{"user_id":"b94133a3-e35d-4c94-9463-d806a64afd71", "used":false}],"column_types":{"user_id":"ascii","used":"boolean"}}}"
Server:
[info] - org.scassandra.server.actors.ExecuteHandler - Found prime PreparedPrime(List(CqlAscii),Prime(List(Map(used -> false, used_id-> b94133a3-e35d-4c94-9463-d806a64afd71 .....
I think it can easily be fixed by using ListMap in the server storage.
Hello,
I think I found an issue with Quill (http://getquill.io/) vs SCassandra. Quill is using a mapping function and applies to that to case class. E.g "case class Token(user_id: String. used: Boolean)". When i now try to return a row in a test i try todo this:
PrimingRequest.queryBuilder()
.withQuery("SELECT user_id, used from TOKENS")
.withRows(row)
.build();
where row is:
Map[String, Any](
"used" -> false,
"user_id" -> "b94133a3-e35d-4c94-9463-d806a64afd71"
)
For some reason it seems that the order is than flipped around randomly. My assume is that there is some kind of "iterator" which is not respecting the insertion order. I managed to switch to ListMap on client - side and regarding to the logs its fine. But according to the server-response the order is been flipped:
Client:
[debug] - org.apache.http.wire - http-outgoing-0 >> "{"when":{"query":"SELECT user_id, used from TOKENS"},"then":{"variable_types":[],"rows":[{"user_id":"b94133a3-e35d-4c94-9463-d806a64afd71", "used":false}],"column_types":{"user_id":"ascii","used":"boolean"}}}"
Server:
[info] - org.scassandra.server.actors.ExecuteHandler - Found prime PreparedPrime(List(CqlAscii),Prime(List(Map(used -> false, used_id-> b94133a3-e35d-4c94-9463-d806a64afd71 .....
I think it can easily be fixed by using ListMap in the server storage.