feat(arrow): Use field name for lookup when field_id in parquet is unavailable#1566
Closed
fvaleye wants to merge 1 commit intoapache:mainfrom
Closed
feat(arrow): Use field name for lookup when field_id in parquet is unavailable#1566fvaleye wants to merge 1 commit intoapache:mainfrom
fvaleye wants to merge 1 commit intoapache:mainfrom
Conversation
Collaborator
|
Is this a duplicate of PR? |
Contributor
Author
Oh, I actually missed this PR. I started working on this after reading the issue to get familiar with the codebase. Would you like me to close this one? |
…ata is unavailable When reading Arrow data from sources that don't provide the PARQUET:field_id metadata (like DataFusion), the column lookup failed. This change introduces a fallback mechanism to look up fields by name if the field ID is not present in the Arrow field metadata. This improves compatibility with various Arrow data sources. The commit also includes: - A new unit test to verify the name-based fallback logic. - A more detailed error message when a field can't be found.
feb2918 to
6f614f7
Compare
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
What changes are included in this PR?
This PR improves compatibility with Arrow data sources like DataFusion that may not provide the
PARQUET:field_idmetadata in their schemas.When
field_idis unavailable, this change introduces a fallback mechanism to look up fields byname. This makes the integration more robust and prevents lookup failures.The key changes include:
Field Lookup Fallback: The core logic now uses the field
namefor column lookups whenfield_idis missing.Enhanced Error Messages: The error message for a failed lookup is now more descriptive, making it easier to debug schema issues.
Are these changes tested?
Yes. A new unit test has been added to specifically validate the name-based fallback logic, ensuring this new behavior is covered.