yuqi1129 opened a new pull request, #13921:
URL: https://github.com/apache/gravitino/pull/13921

   Cherry-pick Information:
   
   Original PR: #13919 ([#13918] fix(doris): Reject adding auto-increment 
columns)
   Tracking issue: #13918
   Target branch: branch-1.3
   Status: ⚠️ Conflict resolved in tests only (main source and docs applied 
cleanly)
   
   Draft until #13919 is merged. Opened in parallel so the fix can land in 1.3.
   
   Conflict resolution: in `TestDorisTableOperationsSqlGeneration`, only 
`testAddAutoIncrementColumnIsRejected` is added. The other tests in the 
conflict context come from #12767, which is backported separately in #13920.
   
   ### What changes were proposed in this pull request?
   
   - `DorisTableOperations`: reject an `AddColumn` change that sets 
`autoIncrement` with an `IllegalArgumentException`, instead of silently 
dropping the flag.
   - Document in `jdbc-doris-catalog.md` that auto-increment columns can only 
be defined at table creation.
   
   ### Why are the changes needed?
   
   The add-column SQL ignored `isAutoIncrement()`, so the request succeeded 
without auto-increment. Emitting `AUTO_INCREMENT` is not an option:
   
   - Doris 2.1.5+ and 3.0.1+ reject it.
   - Earlier 2.1.x and 3.0.0 accept it, but never generate values for the added 
column (verified on Doris 2.1.0).
   
   Fix: #13918
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Adding a column with `autoIncrement = true` to a Doris table now fails 
with `Doris does not support adding auto-increment column ...`, where it 
previously succeeded without auto-increment.
   
   ### How was this patch tested?
   
   - New unit test 
`TestDorisTableOperationsSqlGeneration.testAddAutoIncrementColumnIsRejected`.
   - `./gradlew :catalogs:catalog-jdbc-doris:test -PskipITs`
   - Checked the Doris behavior manually against 
`apache/doris:doris-all-in-one-2.1.0`.
   


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