mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-09 16:33:35 +00:00
CQL supports C-style casts with the destination type specified inside parenthesis e.g `blob_column = (blob)funcThatReturnsInt()`. These casts can be used to convert values of types that have compatible binary representation, or as a type hint to specify the type where the situation is ambiguous. I didn't find any cql-pytest tests for this feature, so I added some. It looks like the feature works, but only partially. Doing things like this works: `blob_column = (blob)funcThatReturnsInt()` But trying to do something a bit more complex fails: `blob_column = (blob)(int)1234` This is the case in both Cassandra and Scylla, the tests introduced in this commit pass on both of them. In future commits I will extend this feature to support the more complex cases as well, then some tests will have to be marked scylla_only. Signed-off-by: Jan Ciolek <jan.ciolek@scylladb.com>