Skip to content

Conversation

@samansmink
Copy link
Collaborator

@samansmink samansmink commented Mar 13, 2025

This initial PR offers partial support for column mapping. To achieve this, we parse the transformation expression provided by kernel to get the mapping for each file.

This PR adds:

  • the column mapping code
  • refactor/clean up of test data generator
  • more testing for column mapping / schema evolution

The main limitation is that this does not yet support nested field mapping. This currently isn't possible in DuckDB's MultiFileReader API in a sensible way. We are however planning to refactor the MultiFileReader(MFR) API for DuckDB v1.3.0 to ensure this is possibly to do quite easily. This refactor should also make this whole process much more understandable because it's currently a serious mental exercise to wrap your head around column mapping for nested types in DuckDB. It will bring the MFR API much closer to what the delta kernel wants us to do with the read schema's and transformations.

@samansmink samansmink merged commit 026345b into duckdb:main Mar 17, 2025
19 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.

1 participant