DataType.BIT = 25 is defined in converter.py but no converter function is registered for it in _DEFAULT_CONVERTERS. CrateDB serialises BIT column values as Base64-encoded strings over the HTTP interface, so the raw value returned to Python is an opaque base64 string rather than a usable bit representation.
Current behaviour
CREATE TABLE t_binary (flags BIT(8))
cur.execute("SELECT flags FROM t WHERE id = 1")
row = cur.fetchone()
print(row[0]) # → 'AQID' (raw base64)
Proposed change
Add a _to_bit_string converter that decodes the base64 bytes and returns a Python a bitarray/string representation.
Notes
This implementation is needed to implement:
DataType.BIT = 25is defined inconverter.pybut no converter function is registered for it in_DEFAULT_CONVERTERS. CrateDB serialises BIT column values as Base64-encoded strings over the HTTP interface, so the raw value returned to Python is an opaque base64 string rather than a usable bit representation.Current behaviour
CREATE TABLE t_binary (flags BIT(8))Proposed change
Add a
_to_bit_stringconverter that decodes the base64 bytes and returns a Python abitarray/stringrepresentation.Notes
This implementation is needed to implement: