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 07:56:05 UTC

[PR] Use database default schema in encrypt assignment tokens [shardingsphere]

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

   Fixes #ISSUSE_ID.
   
   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 encrypt assignment tokens [shardingsphere]

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


-- 
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 encrypt assignment tokens [shardingsphere]

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

   ```markdown
   ### Result
   
   **Review Result: Mergeable**
   
   The assignment token generator now supplies the database metadata owner’s resolved default schema to encryption algorithms when SQL omits a schema.
   
   ### Evidence
   
   - [`generateSQLTokens`](https://github.com/apache/shardingsphere/blob/1c587c5ace0c549ffaebdca26860f4521bceb51d/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/assignment/EncryptAssignmentTokenGenerator.java#L71-L85) preserves an explicit schema and otherwise uses `database.getDefaultSchemaName()`.
   - The resolved schema is propagated through literal assignment generation to the [cipher, assisted-query, and like-query algorithm contexts](https://github.com/apache/shardingsphere/blob/1c587c5ace0c549ffaebdca26860f4521bceb51d/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/assignment/EncryptAssignmentTokenGenerator.java#L116-L143).
   - The [focused regression test](https://github.com/apache/shardingsphere/blob/1c587c5ace0c549ffaebdca26860f4521bceb51d/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/assignment/EncryptAssignmentTokenGeneratorTest.java#L116-L130) verifies the resolved schema reaches encryption and produces the expected cipher assignment.
   - Focused verification against the exact PR head passed: `EncryptAssignmentTokenGeneratorTest` — 4 tests, 0 failures, 0 errors, exit code 0.
   
   ### Coverage
   
   - Reviewed head: `1c587c5ace0c549ffaebdca26860f4521bceb51d`.
   - Merge base: `897225986af790052db0b6b594d7da80b7774e5c`.
   - The authoritative GitHub scope and local triple-dot scope matched: 2 files reviewed.
   - Reviewed the default-schema-aware encryption assignment cluster across explicit/default schema selection, literal encryption contexts, cipher/assisted/like variants, parameter assignments, and high-frequency invocation impact.
   - 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