thswlsqls opened a new pull request, #40072:
URL: https://github.com/apache/shardingsphere/pull/40072
Fixes #40068.
Changes proposed in this pull request:
- Map the `shardingDatabaseValue` / `shardingTableValue` aliases to
`SHARDING_DATABASE_VALUE` / `SHARDING_TABLE_VALUE` before upper-casing the key
in `SQLHintUtils.extractHint`, so `HintValueContext` finds alias hint values.
- The aliases are documented in
`docs/document/content/user-manual/common-config/sql-hint.en.md`; #23189
recognized them but never mapped them to the canonical key, so they were stored
as `T_ORDER.SHARDINGDATABASEVALUE` and dropped during routing.
- Canonical keys behave as before; no public signature changes.
- Update the `table_alias_numeric_value` rows in `SQLHintUtilsTest` (added
in #38429) to expect `[10]`, since they recorded behaviour that contradicts the
documentation, and add `default_alias_numeric_value` rows. The changed rows
fail without the fix.
AI assistance: Claude Code was used to draft the change and its unit tests
in `SQLHintUtils.java`, `SQLHintUtilsTest.java`, and `RELEASE-NOTES.md`. 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`. Not run on the full repository;
ran `./mvnw install -pl infra/common -am -B -T1C -Dmaven.javadoc.skip
-Dmaven.jacoco.skip -e`, plus `spotless:check`, `checkstyle:check`, and
`apache-rat:check` with `-Pcheck` on the full repository.
- [ ] I have made corresponding changes to the documentation. Not needed:
the documentation already describes the fixed behaviour.
- [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]