You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "terrymanu (via GitHub)" <gi...@apache.org> on 2026/09/10 05:06:25 UTC
[PR] Fix H2 primary key and identity metadata loading [shardingsphere]
terrymanu opened a new pull request, #39787:
URL: https://github.com/apache/shardingsphere/pull/39787
(no comment)
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix H2 primary key and identity metadata loading [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu commented on PR #39787:
URL: https://github.com/apache/shardingsphere/pull/39787#issuecomment-5613499087
### Result
**Review Result: Mergeable**
The primary-key SQL now uses `USING`, and the related private members consistently use `PrimaryKeyColumn` in their names. The behavior and number of queries remain unchanged.
### Evidence
- `H2MetaDataLoader.java:59-61`: Uses `USING (CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, CONSTRAINT_NAME)` for the required join.
- `H2MetaDataLoader.java:59-63`: Constants are explicitly named `PRIMARY_KEY_COLUMN_META_DATA_SQL`.
- `H2MetaDataLoader.java:173-181`: The getter and loader are renamed to `getPrimaryKeyColumnMetaDataSQL` and `loadTablePrimaryKeyColumns`.
- H2 2.2.224 runtime verification: The `USING` query correctly returns `ID` and `TENANT_ID` for a composite primary key.
- H2 module tests: 42 tests passed.
- Spotless: Both files passed with no additional changes.
- Checkstyle: 0 violations.
- RAT: 0 unapproved or unknown licenses.
- The final diff contains only the two intended files, `git diff --check` passes, and all obsolete names have been removed.
### Coverage
- Type: Standalone local candidate.
- Baseline: `22c7aa7284aa512caae4d00d2926b0c193140d1f`.
- Scope: H2 metadata loader and its unit tests.
- Reviewed: SQL semantics, composite primary keys, naming, test validity, performance, resource lifecycle, and scope convergence.
- Unresolved issues: None.
- CI: This result covers local code only; remote CI 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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix H2 primary key and identity metadata loading [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu merged PR #39787:
URL: https://github.com/apache/shardingsphere/pull/39787
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org