terrymanu commented on PR #39833:
URL: https://github.com/apache/shardingsphere/pull/39833#issuecomment-5653165097
### Result
**Review Result: Mergeable**
Blocking issues: 0. The fix addresses the root cause without introducing
semantic changes or unnecessary design complexity.
Code review recommendation: No changes recommended.
### Evidence
- `H2MetaDataLoader.java:56` now queries `INFORMATION_SCHEMA.INDEX_COLUMNS`,
which directly provides `COLUMN_NAME` and `IS_UNIQUE`.
- `H2MetaDataLoader.java:144` groups index columns by table and index name
while preserving composite index column order through `ORDINAL_POSITION`.
- Primary key indexes are correctly marked as unique through `IS_UNIQUE`,
while regular indexes remain non-unique.
- The index metadata is still loaded with a single query, introducing no
additional database round trips.
- Primary key columns, generated columns, views, schemas, and metadata
loaders for other databases remain unchanged.
- Unit tests cover a regular composite index, column order, and primary key
index uniqueness.
- Focused tests: 3 passed, 0 failed.
- H2 module tests: 42 passed, 0 failed.
- Spotless: Both target files passed.
- Checkstyle: 0 violations.
### Coverage
- Candidate type: Standalone local candidate.
- Baseline: `d613652c999968544ed7278e8e21897353e88d5c`
- Reviewed commit: `8973f60d38ee1be8bec54c9fd25d1dd00f512b52`
- Reviewed files:
-
`database/connector/dialect/h2/src/main/java/org/apache/shardingsphere/database/connector/h2/metadata/data/loader/H2MetaDataLoader.java`
-
`database/connector/dialect/h2/src/test/java/org/apache/shardingsphere/database/connector/h2/metadata/data/loader/H2MetaDataLoaderTest.java`
- Root cause, blast radius, test validity, runtime risk, and convergence
reviews were completed.
- No unresolved evidence gaps were found.
- Apache RAT was not applicable because no files, license headers, POM
files, or RAT configuration were added or changed.
- This result covers code correctness only; remote CI status was not
reviewed.
--
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]