mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-26 11:30:36 +00:00
Recently I added a test that verified that blobAsInt() accepts a zero- byte blob and return an "empty" integer. I was asked by one of the reviewers - what happens if we try to pass a *three* byte blob to blobAsInt()? Here is a new test that demonstrates that the answer is: Besides the 0-byte blob, blobAsInt() only allows a 4-byte blob. Trying 3 or 5 bytes will result in an invalid query error being returned. The test passes on both Cassandra and Scylla, confirming their behavior is the same. The test checks all fixed-sized integer types - int (4 bytes), bigint (8 bytes), smallint (2 bytes) and tinyint (1 byte). Signed-off-by: Nadav Har'El <nyh@scylladb.com> Message-Id: <20220411093803.651881-1-nyh@scylladb.com>
19 KiB
19 KiB