zhang-arvin opened a new pull request, #9438:
URL: https://github.com/apache/paimon/pull/9438

   ## Purpose
   
   This PR adds a guard in `SchemaManager` that prevents schema changes 
(specifically `DropColumn`) from being applied when the column is referenced by 
a live Global Index.
   
   ## Problem
   
   Currently, schema changes like dropping a column can proceed even when 
Global Indexes defined on that column exist. This leads to inconsistent index 
state and potential data corruption.
   
   ## Solution
   
   Added `checkGlobalIndexConflicts` method in `SchemaManager` that:
   1. Scans table options for `global-index` entries to extract indexed column 
names
   2. Before applying schema changes, checks if any `DropColumn` targets a 
Global Index column
   3. Throws `UnsupportedOperationException` with a clear message directing 
users to drop the Global Index first
   
   ## Testing
   
   - Compilation verified: `mvn compile -pl paimon-core -am -DskipTests` passes
   
   ## Related Issue
   
   Closes #9419


-- 
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