Skip to content

feat: add column mapping support when reading tables#3954

Closed
JonatanMartens wants to merge 7 commits intodelta-io:mainfrom
JonatanMartens:column-mapping
Closed

feat: add column mapping support when reading tables#3954
JonatanMartens wants to merge 7 commits intodelta-io:mainfrom
JonatanMartens:column-mapping

Conversation

@JonatanMartens
Copy link
Copy Markdown
Contributor

Description

This pr adds the ability to read tables with the column mapping feature enabled.

Related Issue(s)

Partially implements #930, but lacks the ability to write to tables with column mapping.

Documentation

@github-actions github-actions bot added binding/python Issues for the Python package binding/rust Issues for the Rust crate labels Nov 27, 2025
@github-actions
Copy link
Copy Markdown

ACTION NEEDED

delta-rs follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

@JonatanMartens JonatanMartens changed the title Add column mapping support when reading tables feat: add column mapping support when reading tables Nov 27, 2025
Comment thread python/deltalake/table.py
Comment on lines -924 to 925
if (
table_protocol.reader_features
and "columnMapping" in table_protocol.reader_features
):
raise DeltaProtocolError(
"The table requires reader feature 'columnMapping' "
"but this is not supported using pyarrow Datasets."
)

if (
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.

Why is this removed? The pr itself doesn't provide support for reading column mapping with pyarrow

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

My primary use case is loading delta tables with datafusion (in python not rust), so must have missed it.
Will look into adding support for reading with pyarrow

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have opened a pr to arrow apache/arrow#48289, once that is merged we can support column mapping in datasets.

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.

I think it's worthwhile to get this merged in and throw an error on pyarrow usage, I have no clue what percentage of using pyarrow but I think it's likely considered legacy

Copy link
Copy Markdown
Contributor Author

@JonatanMartens JonatanMartens Dec 24, 2025

Choose a reason for hiding this comment

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

@abhiaagarwal sounds good to me.
@ion-elgreco what do you think? We could print a warning when initializing the table in python (if it column mapping is enabled) and throw an error if the user tries to use the pyarrow methods

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 37.27%. Comparing base (dee83dd) to head (edb5739).
⚠️ Report is 77 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #3954       +/-   ##
===========================================
+ Coverage   25.76%   37.27%   +11.51%     
===========================================
  Files         127       87       -40     
  Lines       20540    13257     -7283     
  Branches    20540    13257     -7283     
===========================================
- Hits         5292     4942      -350     
+ Misses      14886     7984     -6902     
+ Partials      362      331       -31     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ion-elgreco ion-elgreco marked this pull request as draft December 11, 2025 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

binding/python Issues for the Python package binding/rust Issues for the Rust crate

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants