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

[PR] Refactor AbstractTableRuleSegment [shardingsphere]

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

   (no comment)


-- 
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] Refactor AbstractTableRuleSegment [shardingsphere]

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

   ### Result
   
   **Review Result: Mergeable**
   
   The refactor preserves DistSQL parsing and handler behavior while making key-generation and audit strategy segments constructor-owned.
   
   ### Evidence
   
   - The latest reviewed candidate is commit [`c89cbbefc20c`](https://github.com/apache/shardingsphere/commit/c89cbbefc20cab39854d6e4aa0f66010287a4234), based on `223b6ceaca42`; GitHub’s seven-file scope matches the local triple-dot diff.
   - `AbstractTableRuleSegment` now receives both optional strategies through its generated required-arguments constructor, and `AutoTableRuleSegment` delegates all four values to it.
   - `ShardingDistSQLStatementVisitor` still constructs the key-generation and audit segments before creating the auto-table segment. CREATE/ALTER behavior, including absent optional clauses, remains unchanged.
   - Repository-wide caller inspection found no remaining mutation through the removed setters. Checker, converter, and executor consumers continue to read the same values through getters.
   - Focused verification passed:
     - 55 handler tests across the four changed test classes.
     - 254 `InternalDistSQLParserIT` cases, including CREATE/ALTER auto-table rules with key generators and auditors.
     - Maven result: `BUILD SUCCESS`, exit code `0`.
   
   ### Coverage
   
   - Candidate: public PR [#39844](https://github.com/apache/shardingsphere/pull/39844), head `c89cbbefc20cab39854d6e4aa0f66010287a4234`; no local delta included.
   - Authoritative files accounted for:
     - `features/sharding/distsql/statement/src/main/java/org/apache/shardingsphere/sharding/distsql/segment/table/AbstractTableRuleSegment.java`
     - `features/sharding/distsql/statement/src/main/java/org/apache/shardingsphere/sharding/distsql/segment/table/AutoTableRuleSegment.java`
     - `features/sharding/distsql/parser/src/main/java/org/apache/shardingsphere/sharding/distsql/parser/core/ShardingDistSQLStatementVisitor.java`
     - `features/sharding/distsql/handler/src/test/java/org/apache/shardingsphere/sharding/distsql/handler/checker/ShardingTableRuleStatementCheckerTest.java`
     - `features/sharding/distsql/handler/src/test/java/org/apache/shardingsphere/sharding/distsql/handler/converter/ShardingTableRuleStatementConverterTest.java`
     - `features/sharding/distsql/handler/src/test/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterShardingTableRuleExecutorTest.java`
     - `features/sharding/distsql/handler/src/test/java/org/apache/shardingsphere/sharding/distsql/handler/update/CreateShardingTableRuleExecutorTest.java`
   - Behavior clusters reviewed: table-rule construction contract, DistSQL AST construction, and handler fixture/consumer preservation.
   - Root-cause, blast-radius, tests/runtime, and final convergence passes completed with no unresolved gaps.
   - Style verification:
     - Command: `./mvnw -pl features/sharding/distsql/statement,features/sharding/distsql/parser,features/sharding/distsql/handler spotless:check checkstyle:check -Pcheck -T1C`
     - Spotless: exit `0`; all seven applicable PR files covered by their complete owning-module scopes.
     - Checkstyle: exit `0`; all seven applicable PR files covered, with zero violations.
   - Parser scope: ShardingSphere-specific DistSQL; no database dialect family is affected. Repository grammar, Parser IT fixtures, and user-facing DistSQL examples were checked. External database documentation is not applicable because the PR changes no SQL syntax.
   - This is a Code Correctness Review. The result is code-scope only; GitHub CI and Actions were 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


Re: [PR] Refactor AbstractTableRuleSegment [shardingsphere]

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


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