-
Couldn't load subscription status.
- Fork 537
Description
What happened?
The below Python code raises
_internal.DeltaError: Kernel error: Json error: whilst decoding field 'minValues': whilst decoding field 'sales_date': failed to parse 1760918400000 as Date32"
on python 3.13.7, deltalake 1.2.0 and pyarrow 21.0.0.
from datetime import date
from tempfile import TemporaryDirectory
import pyarrow as pa
from deltalake import write_deltalake
with TemporaryDirectory() as tmp_dir:
delta_table_path = f"{tmp_dir}/DELTA"
schema = pa.schema([pa.field("sales_date", pa.date64())])
table = pa.table([pa.array([date(2025, 10, 20)])], schema=schema)
write_deltalake(delta_table_path, table)When changing the type to pa.date32 it works as expected. Explicitly creating the data as date64 before writing (pa.table([pa.array([date(2025, 10, 20)], type=pa.date64())], schema=schema)) does not make a difference.
Expected behavior
The table should be written without error. Reading it back with
Deltalake(delta_table_path).to_pandas()should result in a dataframe with 1 row and a column "sales_date" with value "2025-10-20"
Operating System
macOS
Binding
Python
Bindings Version
1.2.0
Steps to reproduce
Execute my code example as is