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

   Fixes #40065.
   
   Changes proposed in this pull request:
     - `SupportedSQLCheckEngine.getCurrentSchema()` now resolves the named 
schema with `TablesContext#getIdentifierSchemaName()`, using the quote-aware 
`ShardingSphereDatabase#getSchema(IdentifierValue)` overload instead of the 
`String` overload (`QuoteCharacter.NONE`).
     - A quoted mixed-case schema (e.g. `"MySchema"` on 
PostgreSQL/openGauss/Oracle) no longer falls back to the default schema, which 
made sharding DDL checkers raise false `NoSuchTableException` / 
`TableExistsException`.
     - Unquoted schema names and the default-schema fallback behave as before.
     - Follows the `SchemaRefreshUtils` migration in #38653 (context: closed 
#38391).
     - Tests: `assertCheckSQL` now stubs `getIdentifierSchemaName()`; new 
`assertCheckSQLWithQuotedSchemaName` fails before the fix. The case policy is 
simulated with mocks and no E2E/IT was run, so the scope is the check stage.
   
   AI assistance: Claude Code was used to draft the change and its unit tests 
in `infra/checker` (`SupportedSQLCheckEngine`, `SupportedSQLCheckEngineTest`) 
and the `RELEASE-NOTES.md` entry. I reviewed, verified, and take responsibility 
for every line submitted.
   
   ---
   
   Before committing this PR, I'm sure that I have checked the following 
options:
   - [x] My code follows the [code of 
conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) 
of this project.
   - [x] 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`. Ran instead: `./mvnw install -pl 
infra/checker -am -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e` plus 
repo-wide `spotless:check`, `checkstyle:check`, `apache-rat:check` with 
`-Pcheck` (all passed).
   - [ ] I have made corresponding changes to the documentation. No user-facing 
documentation change is needed.
   - [x] I have added corresponding unit tests for my changes.
   - [x] 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/)
   - [x] 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to