Skip to content

fix(parquet): restore Arrow duration units from schema metadata - #1095

Merged
zeroshade merged 1 commit into
apache:mainfrom
fallintoplace:fix/parquet-duration-origin-schema
Aug 6, 2026
Merged

fix(parquet): restore Arrow duration units from schema metadata#1095
zeroshade merged 1 commit into
apache:mainfrom
fallintoplace:fix/parquet-duration-origin-schema

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

Parquet stores durations as unannotated INT64 because it has no duration logical type. When stored Arrow schema metadata says the original field was a duration, the reader currently keeps the inferred int64 type and loses the unit.

What changes are included in this PR?

Restore the original duration type when the stored origin type is a duration and Parquet inference produced int64. Keep the change limited to this schema restoration case.

Are these changes tested?

  • go test ./parquet/pqarrow -run TestRestoreDurationFromStoredSchema -count=1

Are there any user-facing changes?

No API changes. This corrects the reported behavior while preserving the existing ownership and compatibility contracts.

@fallintoplace fallintoplace changed the title fix(parquet): restore duration types from stored schemas fix(parquet): restore duration units from Arrow schema Aug 5, 2026
@fallintoplace fallintoplace changed the title fix(parquet): restore duration units from Arrow schema fix(parquet): restore Arrow duration units from schema metadata Aug 6, 2026
@zeroshade
zeroshade merged commit 3298f66 into apache:main Aug 6, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants