You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inconsistency between written Parquet and Arrow schemas when coerce_timestamps is set #47336
Describe the bug, including details regarding any error messages, version, and platform.
Arrow's parquet writer does not update the unit of timestamp columns in the written base64 encoded ARROW::schema that have been casted using the coerce_timestamps argument. This leads to an inconsistent behavior/confusion when reading such a file as the two schemas (Parquet and ARROW) contain different timestamp units.
Arrow's parquet reader uses the timestamp units from the Parquet schema and only extracts timezone info from the ARROW::schema if available whereas the parquet reader in Polars directly uses the ARROW::schema when available ignoring the Parquet schema
Expected Behavior
The parquet writer may also update the timestamp unit for the casted columns in the ARROW::schema for consistency and/or the parquet reader should override the unit from ARROW::schema over Parquet schema (faithful reconstruction of units + timezone?).
The writer builds the Parquet schema with the coercion applied, but serialises the original schema into ARROW:schema (GetSchemaMetadata(schema, ...) in FileWriter::Open, cpp/src/parquet/arrow/writer.cc).
Polars 2.2.0 reads this file as Datetime(time_unit='ms'), so the mismatch no longer shows up there, but the two schemas in the file still disagree.
As agreed above this is the same problem as #45062, which is the older report, so closing this one as a duplicate.
Activity
daviewales commentedon Jun 10, 2026
Possibly related? #45062
mhaseeb123 commentedon Jun 11, 2026
Looks like it. Been almost a year since I opened this. I have to remember what the issue even was. 😄
thisisnic commentedon Nov 25, 2026
I used an AI agent to rerun this on current releases and compare it with #45062, and I've reviewed the results.
🤖 :
This still happens on pyarrow 26.0.1 (Linux x86_64):
The writer builds the Parquet schema with the coercion applied, but serialises the original schema into
ARROW:schema(GetSchemaMetadata(schema, ...)inFileWriter::Open,cpp/src/parquet/arrow/writer.cc).Polars 2.2.0 reads this file as
Datetime(time_unit='ms'), so the mismatch no longer shows up there, but the two schemas in the file still disagree.As agreed above this is the same problem as #45062, which is the older report, so closing this one as a duplicate.