Skip to content

Spec: Clarify that readers must accept promotable types in any data file - #18404

Open
gsandeep1241 wants to merge 1 commit into
apache:mainfrom
gsandeep1241:clarify-spec-for-reading-narrow-types
Open

gsandeep1241 wants to merge 1 commit into
apache:mainfrom
gsandeep1241:clarify-spec-for-reading-narrow-types

Conversation

@gsandeep1241

Copy link
Copy Markdown

Type promotion lets a field evolve, for example from DECIMAL(8. 0) to DECIMAL(25. 0)without rewriting data files. Existing Parquet files keep storing the column as int32 with DECIMAL(8. 0) and readers must read them as DECIMAL(25, 0).

The spec addresses reading narrower types in the context of schema evolution. However, schema evolution can potentially leave no markers in the metadata and so readers must be prepared to read narrower types than the type specified in the schema.

(Discussion open on mail thread)

…a files

Readers should accept data file columns whose type is promotable to the
field's current type, not just an exact match. This handles the case
where a file was written before a type promotion occurred.
@github-actions github-actions Bot added the Specification Issues that may introduce spec changes. label Oct 6, 2026
@gsandeep1241
gsandeep1241 marked this pull request as ready for review October 7, 2026 01:10

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Specification Issues that may introduce spec changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant