Skip to content

[core] Fix rewriting file index with multiple map keys of one column - #9669

Open
jackylee-ch wants to merge 1 commit into
apache:masterfrom
jackylee-ch:fileindex-project-dedup
Open

[core] Fix rewriting file index with multiple map keys of one column#9669
jackylee-ch wants to merge 1 commit into
apache:masterfrom
jackylee-ch:fileindex-project-dedup

Conversation

@jackylee-ch

Copy link
Copy Markdown
Contributor

Purpose

FileIndexOptions keys nested index entries by Column, nested name included, so m[k1] and m[k2] are two entries reporting the same top level column m. FileIndexProcessor collected that name once per entry into a list, so the projection carried m twice and RowType.project rejected it: Field names must be unique. Found duplicates: [m].

DataFileIndexWriter adds every nested key to one maintainer per map column, so the config is valid on write; only rewrite_file_index failed.

Tests

FileIndexProcessorTest.testProcessIndexesTwoKeysOfOneMapColumn, reading the rewritten index back to assert both keys survive.

Written with Claude Code; reasoning and verification are mine.

FileIndexOptions keys nested index entries by Column, which includes the
nested name, so m[k1] and m[k2] are two entries reporting the same top
level column m. FileIndexProcessor collected that name once per entry into
a list, so the projection carried m twice and RowType.project rejected it
with "Field names must be unique. Found duplicates: [m]".

DataFileIndexWriter already keys its maintainer by the top level column
and adds each nested key to it, so the configuration is valid on write and
only rewriting the index failed.
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