Skip to content

GH-50910: [Parquet] Tolerate unrecognized logical/physical type combinations when reading - #50909

Open
divjotarora wants to merge 2 commits into
apache:mainfrom
divjotarora:log-phys-type-combo
Open

GH-50910: [Parquet] Tolerate unrecognized logical/physical type combinations when reading#50909
divjotarora wants to merge 2 commits into
apache:mainfrom
divjotarora:log-phys-type-combo

Conversation

@divjotarora

@divjotarora divjotarora commented Aug 18, 2026

Copy link
Copy Markdown

Rationale for this change

See apache/parquet-format#607 for rationale.

What changes are included in this PR?

This PR gracefully handles unrecognized logical/physical type combinations by dropping the logical type during the read and dropping any associated statistics for the relevant columns. Note that unrecognized logical types are already handled gracefully and no changes were required.

Are these changes tested?

Yes, via unit tests and an e2e test that reads a real file that contains an invalid type combination.

Are there any user-facing changes?

No

@github-actions

Copy link
Copy Markdown

Thanks for opening a pull request!

This pull request has been automatically converted to a draft because its title doesn't match Arrow's required format.

If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

After updating the title, you can mark the pull request as ready for review.

See also:

@github-actions
github-actions Bot marked this pull request as draft August 18, 2026 20:34
@divjotarora divjotarora changed the title Tolerate unrecognized logical/physical type combinations when reading GH-50910: Tolerate unrecognized logical/physical type combinations when reading Aug 18, 2026
@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #50910 has been automatically assigned in GitHub to PR creator.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes in this file are due to pinning to a parquet-testing commit that contains the new file from apache/parquet-testing#122. The only file we actually use from this set is data/int32_with_uuid_logical_type.parquet.

@divjotarora
divjotarora marked this pull request as ready for review August 18, 2026 23:58

@Reranko05 Reranko05 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also add Component of the PR in the title, it will be easier for maintainers to review it.
GH-<Issue Number>: [<Component>] <Title>

@divjotarora divjotarora changed the title GH-50910: Tolerate unrecognized logical/physical type combinations when reading GH-50910: [Core] Tolerate unrecognized logical/physical type combinations when reading Aug 19, 2026
@divjotarora divjotarora changed the title GH-50910: [Core] Tolerate unrecognized logical/physical type combinations when reading GH-50910: [Format] Tolerate unrecognized logical/physical type combinations when reading Aug 19, 2026
@github-actions github-actions Bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Aug 20, 2026
@emkornfield emkornfield changed the title GH-50910: [Format] Tolerate unrecognized logical/physical type combinations when reading GH-50910: [Parquet] Tolerate unrecognized logical/physical type combinations when reading Aug 20, 2026
Comment thread cpp/src/parquet/schema.cc Outdated
Comment thread cpp/src/parquet/schema.cc
// annotation.
if (logical_type && !logical_type->is_nested() &&
!logical_type->is_applicable(physical_type, element->type_length)) {
logical_type = UndefinedLogicalType::Make();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The java implementation seems to log in this branch any reason you aren't doing the same? it is a larger change but at some point we might want to make this configurable?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a log here as well.

it is a larger change but at some point we might want to make this configurable?

I'm not sure we need this to be configurable. It's not in parquet-java and likely would not be in arrow-rs based on previous changes made there. Is it standard to add such flags in this implementation?

@emkornfield emkornfield left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a couple of questions, but seems reasonable.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants