You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "thswlsqls (via GitHub)" <gi...@apache.org> on 2026/09/05 13:19:45 UTC

[PR] Fix empty rows returned by SHOW SHADOW TABLE RULE for specified table [shardingsphere]

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

   
   Fixes #39738.
   
   Changes proposed in this pull request:
     - Move `result.add(map)` inside the table name match in `ShowShadowTableRulesExecutor.buildData()`, so `SHOW SHADOW TABLE RULE <tableName>` no longer appends an empty `""|""` row for every non-matching shadow table.
     - Merge the specified and unspecified branches into a single filtered `forEach`; the unspecified `SHOW SHADOW TABLE RULES` result is unchanged.
     - Align with the sibling query executors that already filter before collecting: `ShowShadowRuleExecutor`, `ShowMaskRuleExecutor`, `ShowEncryptRuleExecutor` and `ShowShardingTableReferenceRuleExecutor`.
     - Add a second shadow table `t_order_item` to `cases/show-shadow-table-rules-current-config.yaml` and update both cases in `cases/show-shadow-table-rules.xml`; the fixture previously held one table, so the extra rows were zero and the defect was invisible.
     - Regression guard: with the fixtures updated and the production change reverted, `ShowShadowTableRulesExecutorTest[2]` fails with `Expected: <[1 row]> but: was <[2 rows]>`; with the change applied all 89 tests in `features/shadow/distsql/handler` pass.
     - Local verification scope: repository-wide `spotless:check`, `checkstyle:check` and `apache-rat:check` pass, plus `install -pl features/shadow/distsql/handler -am`. The full `clean install` was not run locally, so that checklist box is left unchecked.
   
   AI assistance: Claude Code was used to draft the change and its test fixtures in `features/shadow/distsql/handler`. 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`.
   - [ ] I have made corresponding changes to the documentation.
   - [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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix empty rows returned by SHOW SHADOW TABLE RULE for specified table [shardingsphere]

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


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