jiangxt2 commented on PR #11731: URL: https://github.com/apache/gravitino/pull/11731#issuecomment-4767500347
Pushed a new commit addressing all review comments. Here is a summary of the fixes: **Critical** - **C2 (line 316)**: Fixed PRIMARY_KEY validation/generation mismatch. `appendTableModelKeySql` now handles both `UNIQUE_KEY` and `PRIMARY_KEY` index types, both emitting `UNIQUE KEY(col)` (Doris Nereids parser does not accept `PRIMARY KEY(col)` syntax; functionally equivalent). - **C3 (line 104)**: Added `validateAutoIncrementVersion()` — queries `SELECT VERSION()` and rejects AUTO_INCREMENT if Doris server < 2.1.0. Clear error message: *"AUTO_INCREMENT requires Doris 2.1.0 or later. Current server version: X.Y.Z"*. **Medium** - **C1/M1 (line 302/530)**: Fixed BITMAP read/write asymmetry. `mapDorisIndexType` now returns `INVERTED` for BITMAP, matching the write path. **Note on 1.2.x**: We chose read-write consistency (both paths emit INVERTED) over version detection, since (1) BITMAP index creation via Gravitino on 1.2.x is an edge case not covered by the existing test suite; (2) server-side version detection for each index type would add significant complexity; (3) the comment in `mapIndexTypeToUsingClause` documents the rationale. If the community prefers version detection here, we can add it in a follow-up. - **M2 (line 520)**: Fixed null `Index_type` default — now returns `UNIQUE_KEY` instead of `INVERTED` for non-PRIMARY indexes (matching the BTREE case). - **M3 (line 343)**: Documented UNIQUE KEY ordered prefix constraint in Javadoc. - **M4 (line 36)**: Added `VERSION_4_0` to `DorisImageName` enum + new `CatalogDoris4xIT` integration test class covering 4.0.x specific features (INVERTED index, ADD/DROP INDEX, AUTO_INCREMENT, UNIQUE KEY model, BITMAP read-back mapping). **Low** - **L1 (line 90)**: Simplified debug logging (removed redundant `type.name()`). **Test results** - Unit tests: 12/12 ✅ - CatalogDoris3xIT: 5/5 ✅ - CatalogDoris4xIT: 5/5 ✅ -- 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]
