Closed rw closed 4 years ago
Could you please let me know which type for a given column do you have in a Cassandra? Is this some sort of text or blob?
@AlexPikalov all blobs!
@AlexPikalov this reproduction doesn't use Cassandra at all though. I'm just showing a potential encoding issue.
FWIW, I suspect that query_values!
is using one of the blanket impls incorrectly: like converting the inner u8
elements instead of the entire Vec<u8>
as one item.
@AlexPikalov If the blanket impls are the cause of my problem, perhaps there's a type hint I can provide somewhere to make it work? That would be a quick fix.
@AlexPikalov Or, I can encode them manually?
@rw,
If it's blob, please try to use Blob
instead of Vec<u8>
@AlexPikalov That works, thank you! I suggest we document this somewhere, because I didn't know how to fix this, even though the fix was simple.
@rw Makes sense to document it. 👍
Following up on #340, here is a test case to show a potential encoding issue with
Vec<Vec<u8>>
usingquery_values!
. I'm not an expert on the CQL binary protocol, but it seems noteworthy to me that each byte in theVec<u8>
items is treated, I think, as a 1-element vector. I'm using cdrs 2.3.3.cc @AlexPikalov