You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "menghaoranss (via GitHub)" <gi...@apache.org> on 2026/08/20 06:49:55 UTC

[PR] Use database default schema in sharding DDL result merger [shardingsphere]

menghaoranss opened a new pull request, #39528:
URL: https://github.com/apache/shardingsphere/pull/39528

   
   Changes proposed in this pull request:
     -
   
   ---
   
   Before committing this PR, I'm sure that I have checked the following options:
   - [ ] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
   - [ ] I have self-reviewed the commit code.
   - [ ] I have (or in comment I request) added corresponding labels for the pull request.
   - [ ] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
   - [ ] I have made corresponding changes to the documentation.
   - [ ] I have added corresponding unit tests for my changes.
   - [ ] I have updated the Release Notes of the current development version. For more details, see [Update Release Note](https://shardingsphere.apache.org/community/en/involved/contribute/contributor/)
   - [ ] I have disclosed the tool and affected files or scope for any material AI assistance, as required by the [AI-assisted contribution policy].
   
   [AI-assisted contribution policy]: https://github.com/apache/shardingsphere/blob/master/AI_POLICY.md
   


-- 
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] Use database default schema in sharding DDL result merger [shardingsphere]

Posted by "menghaoranss (via GitHub)" <gi...@apache.org>.
menghaoranss commented on PR #39528:
URL: https://github.com/apache/shardingsphere/pull/39528#issuecomment-5352575809

   ```markdown
   ### Result
   
   **Review Result: Mergeable**
   
   The DDL result merger now uses the database metadata owner’s resolved default schema for multi-route cursor `FETCH` merging.
   
   ### Evidence
   
   - [`ShardingDDLResultMerger#getSchema`](https://github.com/apache/shardingsphere/blob/8ff8c011a295efb1a1ed0ee4dc076481e24ca835/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/merge/ddl/ShardingDDLResultMerger.java#L66-L68) preserves an explicitly selected schema and otherwise delegates to `database.findDefaultSchema()`.
   - The resolved schema reaches [`FetchStreamMergedResult`](https://github.com/apache/shardingsphere/blob/8ff8c011a295efb1a1ed0ee4dc076481e24ca835/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/merge/ddl/ShardingDDLResultMerger.java#L44-L56), where cursor ordering uses schema table and column metadata.
   - The [focused regression test](https://github.com/apache/shardingsphere/blob/8ff8c011a295efb1a1ed0ee4dc076481e24ca835/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/merge/ddl/ShardingDDLResultMergerTest.java#L85-L98) verifies the schema passed to the fetch merger constructor.
   - Focused verification against the exact PR head passed: `ShardingDDLResultMergerTest` — 4 tests, 0 failures, 0 errors, exit code 0.
   
   ### Coverage
   
   - Reviewed head: `8ff8c011a295efb1a1ed0ee4dc076481e24ca835`.
   - Merge base: `a523db925f427deff69a9e9b85c4b4ce40933a1a`.
   - The authoritative GitHub scope and local triple-dot scope matched: 2 files reviewed.
   - Reviewed the default-schema-aware DDL merge cluster across explicit/default schema selection, multi-route cursor fetching, ordering metadata, and unchanged single-route/non-`FETCH` paths.
   - Completed root-cause/behavior, blast-radius/contracts, tests/runtime/operations, and final convergence passes.
   - No unresolved correctness gaps or blocking issues.
   - Code-correctness result only; 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] Use database default schema in sharding DDL result merger [shardingsphere]

Posted by "menghaoranss (via GitHub)" <gi...@apache.org>.
menghaoranss merged PR #39528:
URL: https://github.com/apache/shardingsphere/pull/39528


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