The num-bigint varint deserializer passes an empty payload directly to the integer constructor.
Code permalink:
|
let val = ensure_not_null_slice::<Self>(typ, v)?; |
The constructor interprets an empty byte slice as numeric zero. Empty varint payloads are a distinct CQL empty value, while canonical zero is encoded differently, so direct deserialization can silently turn empty into zero instead of requiring an empty-aware wrapper to preserve it.
Suggested direction: reject empty payloads for direct bigint deserialization, or otherwise route them through the existing empty-value handling path.
The num-bigint varint deserializer passes an empty payload directly to the integer constructor.
Code permalink:
scylla-rust-driver/scylla-cql/src/deserialize/value.rs
Line 247 in e04a12a
The constructor interprets an empty byte slice as numeric zero. Empty varint payloads are a distinct CQL empty value, while canonical zero is encoded differently, so direct deserialization can silently turn empty into zero instead of requiring an empty-aware wrapper to preserve it.
Suggested direction: reject empty payloads for direct bigint deserialization, or otherwise route them through the existing empty-value handling path.