encoder
BinaryEncoder
Encodes Python physical types into bytes.
Source code in pyiceberg/avro/encoder.py
write_boolean(boolean)
Write a boolean as a single byte whose value is either 0 (false) or 1 (true).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
boolean |
bool
|
The boolean to write. |
required |
write_bytes(b)
write_double(f)
write_float(f)
write_int(integer)
Integer and long values are written using variable-length zig-zag coding.
Source code in pyiceberg/avro/encoder.py
write_utf8(s)
write_uuid(uuid)
Write UUID as a fixed[16].
The uuid logical type represents a random generated universally unique identifier (UUID). An uuid logical type annotates an Avro string. The string has to conform with RFC-4122.