apache / apache/arrow

[C++] Decide on duplicate column handling in scanner, add more tests

Open
#33,552 0 comments 0 reactions 0 assignees View on GitHub
Component: C++ Status: needs champion Type: task
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 18h
Merged PRs (30d)
91

Description

When a schema has duplicate column names it can be difficult to know how to map between the fragment schema and the dataset schema in the default evolution strategy. It's not clear from the comments describing evolution what the exact behavior is right now. Some suggestions have been:

- Grab the first column in the fragment schema with the same name
- Always error if there are duplicate columns
- Allow duplicate columns but expect there to be the same # of occurrences in both the fragment and dataset schema and assume the order is consistent

**Reporter**: [Weston Pace](https://issues.apache.org/jira/browse/ARROW-18388) / @westonpace

**Note**: *This issue was originally created as [ARROW-18388](https://issues.apache.org/jira/browse/ARROW-18388). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*

Contributor guide

Open the contributing guide

Research direction

Start with the scanner's default evolution strategy and the comments describing fragment and dataset schema mapping. Review the migration documentation linked in the issue, then determine the intended behavior for duplicate column names and add tests covering that decision.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.