[core] Fix rewriting file index with multiple map keys of one column - #9669
Open
jackylee-ch wants to merge 1 commit into
Open
[core] Fix rewriting file index with multiple map keys of one column#9669jackylee-ch wants to merge 1 commit into
jackylee-ch wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
FileIndexOptionskeys nested index entries byColumn, nested name included, som[k1]andm[k2]are two entries reporting the same top level columnm.FileIndexProcessorcollected that name once per entry into a list, so the projection carriedmtwice andRowType.projectrejected it:Field names must be unique. Found duplicates: [m].DataFileIndexWriteradds every nested key to one maintainer per map column, so the config is valid on write; onlyrewrite_file_indexfailed.Tests
FileIndexProcessorTest.testProcessIndexesTwoKeysOfOneMapColumn, reading the rewritten index back to assert both keys survive.Written with Claude Code; reasoning and verification are mine.