thswlsqls opened a new pull request, #39854:
URL: https://github.com/apache/shardingsphere/pull/39854
Fixes #39851.
Changes proposed in this pull request:
- `ShardingRuleConfiguration.getLogicTableNames()` now returns the logic
table names of both `tables` and `autoTables`; before, only `tables` was mapped.
- The result is still a `CaseInsensitiveSet`, built the same way as
`ShardingTableNamesRuleAttribute.createLogicalTableNames()`, so
case-insensitive lookup is unchanged.
- Mode persist services pass this collection as `needReloadTables` to
`persistAlteredTables`; with this fix an auto table dropped via `DROP SHARDING
TABLE RULE` is reloaded like a `DATANODES(...)` table. No mode code is touched.
- Aligns with the sibling overrides added in #34906 (Broadcast, Encrypt,
Mask, Single return every table they hold) and with
`DropShardingTableRuleExecutor.getCurrentShardingTableNames()`.
- Added `assertGetLogicTableNamesWithAutoTables` to
`ShardingRuleConfigurationTest`; the existing `assertGetLogicTableNames` is
unchanged.
- Removed the unused `Collectors` import.
AI assistance: Claude Code was used to draft the change and its unit test in
`features/sharding/api`. 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`. Run instead: repository-wide
`./mvnw spotless:check -Pcheck -T1C`, `./mvnw checkstyle:check -Pcheck -T1C`,
`./mvnw apache-rat:check -Pcheck -T1C`, and module-scoped `./mvnw install -pl
features/sharding/api -am -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`
(all passed, `ShardingRuleConfigurationTest` 2 tests).
- [ ] I have made corresponding changes to the documentation. No
documentation change is needed for this fix.
- [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]