Skip to content

[C++][Dataset] Enable column renaming (in physical schema -> dataset schema) in Dataset scanning #26921

@asfimport

Description

@asfimport

Currently, we allow dropping/adding columns when scanning the actual sources of a Dataset (e.g. if newer files in the dataset have additional columns), but we should also provide a way to specify fields that are renamed in certain files of the dataset.

While it might be possible to also provide some convenience for this in the discovery factories, it's probably best to start to see how this could be added to the actual Dataset class and the lower-level constructor functionalities (such as FileSystemDataset main constructor from fragments or from_paths).

What I am thinking right now, is that we would need an (optional) mapping of "field ref/name in physical schema -> name in projected/dataset schema" for each fragment of a dataset.
However, that might not fully fit in the current design, as the fragment doesn't know about the dataset schema, but only sees this when it is projected.

cc @bkietz

Reporter: Joris Van den Bossche / @jorisvandenbossche

Related issues:

Note: This issue was originally created as ARROW-11001. Please see the migration documentation for further details.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions