Expected Behavior
In key_encoding_utils.py, when serializing an int64, we should be able to serialize int64 numbers (up to 2^64 - 1).
Current Behavior
Currently, we get:
struct.error: 'l' format requires -2147483648 <= number <= 2147483647
but l is for long, which is 4 bytes. int64 should be 8 bytes, thus q, representing long long.
Source: https://docs.python.org/3.10/library/struct.html#format-characters
Steps to reproduce
Call _serialize_val() on a number > 2147483647.
Specifications
- Version: 0.22
- Platform:
- Subsystem:
Possible Solution
return struct.pack("<l", v.int64_val), ValueType.INT64 --> return struct.pack("<q", v.int64_val), ValueType.INT64
Expected Behavior
In
key_encoding_utils.py, when serializing an int64, we should be able to serializeint64numbers (up to 2^64 - 1).Current Behavior
Currently, we get:
struct.error: 'l' format requires -2147483648 <= number <= 2147483647but
lis for long, which is 4 bytes.int64should be 8 bytes, thusq, representing long long.Source: https://docs.python.org/3.10/library/struct.html#format-characters
Steps to reproduce
Call
_serialize_val()on a number > 2147483647.Specifications
Possible Solution
return struct.pack("<l", v.int64_val), ValueType.INT64-->return struct.pack("<q", v.int64_val), ValueType.INT64