Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bindings/python/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ impl Utils {
ArrowDataType::Float64 => DataTypes::double(),
ArrowDataType::Utf8 | ArrowDataType::LargeUtf8 => DataTypes::string(),
ArrowDataType::Binary | ArrowDataType::LargeBinary => DataTypes::bytes(),
ArrowDataType::FixedSizeBinary(n) => DataTypes::binary(*n as usize),
ArrowDataType::Date32 => DataTypes::date(),
ArrowDataType::Date64 => DataTypes::date(),
ArrowDataType::Time32(unit) => match unit {
Expand Down
3 changes: 3 additions & 0 deletions bindings/python/test/test_kv_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ async def test_all_supported_datatypes(connection, admin):
pa.field("col_timestamp_ntz", pa.timestamp("us")),
pa.field("col_timestamp_ltz", pa.timestamp("us", tz="UTC")),
pa.field("col_bytes", pa.binary()),
pa.field("col_binary", pa.binary(16)),
]
),
primary_keys=["pk_int"],
Expand Down Expand Up @@ -385,6 +386,7 @@ async def test_all_supported_datatypes(connection, admin):
"col_timestamp_ntz": datetime(2026, 1, 23, 10, 13, 47, 123000),
"col_timestamp_ltz": datetime(2026, 1, 23, 10, 13, 47, 123000),
"col_bytes": b"binary data",
"col_binary": b"binary_data_0123",
}

handle = upsert_writer.upsert(row_data)
Expand All @@ -411,6 +413,7 @@ async def test_all_supported_datatypes(connection, admin):
2026, 1, 23, 10, 13, 47, 123000, tzinfo=timezone.utc
)
assert result["col_bytes"] == b"binary data"
assert result["col_binary"] == b"binary_data_0123"

# Test with null values for all nullable columns
null_row = {"pk_int": 2}
Expand Down
1 change: 1 addition & 0 deletions website/docs/user-guide/python/data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The Python client uses PyArrow types for schema definitions:
| `pa.float32()` / `float64()` | Float / Double | `float` |
| `pa.string()` | String | `str` |
| `pa.binary()` | Bytes | `bytes` |
| `pa.binary(n)` | Binary(n) | `bytes` |
| `pa.date32()` | Date | `datetime.date` |
| `pa.time32("ms")` | Time | `datetime.time` |
| `pa.timestamp("us")` | Timestamp (NTZ) | `datetime.datetime` |
Expand Down
Loading