LuciferYang opened a new pull request, #10247:
URL: https://github.com/apache/paimon/pull/10247

   ### Purpose
   
   `validateRetainedIndexFiles` rejected any retained/added pair of 
data-evolution global index files that share the same index field but carry 
different extra fields, treating them as an overlapping-range conflict even 
when the ranges were disjoint. As a result a table could not hold two global 
index definitions over the same leading column (for example bitmap indexes over 
`(a)` and `(a, b)` created via `create_global_index`), and refreshing one 
definition failed once another over the same column existed, with a misleading 
overlapping-row-range message.
   
   Different extra fields mean a different index definition. The read path 
(`GlobalIndexBuilderUtils.currentIndexEntries`) and the refresh planner 
(`DataEvolutionGlobalIndexRefreshPlanner.matchesFields`) already select index 
files by `indexFieldId` together with `extraFieldIds`, so files with different 
extra fields are never consulted together and their ranges may legitimately 
overlap. This makes the validation agree with those paths: a pair conflicts 
only when the index field, the extra fields, and an overlapping row range all 
match.
   
   This closes #10245.
   
   ### Tests
   
   Added 
`IndexManifestFileHandlerTest.testDataEvolutionDifferentDefinitionsDoNotConflict`:
 it writes a definition over `(a)` and a definition over `(a, b)` whose row 
ranges overlap, asserts both are retained, and asserts that a second file of 
the same `(a)` definition with an overlapping row range still throws with the 
overlapping-row-range message. The coexistence assertion fails on the current 
code and passes with this change.
   
   ### API and Format
   
   No.
   
   ### Documentation
   
   No.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to