You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "Gimini-3 (via GitHub)" <gi...@apache.org> on 2026/08/20 15:35:54 UTC
[PR] Fix incorrect range routing for right-side sharding columns [shardingsphere]
Gimini-3 opened a new pull request, #39534:
URL: https://github.com/apache/shardingsphere/pull/39534
No associated issue.
Changes proposed in this pull request:
- Reverse ordered comparison operators when a sharding column is on the right side of a binary predicate.
- Add parameterized unit coverage for `<`, `<=`, `>`, and `>=`.
Requested labels: `type: bug`, `in: Kernel`.
Verification:
- `./mvnw -pl features/sharding/core -am -DskipITs -Dspotless.skip=true -Dtest=org.apache.shardingsphere.sharding.route.engine.condition.generator.impl.ConditionValueCompareOperatorGeneratorTest -Dsurefire.failIfNoSpecifiedTests=false test`: 23 tests passed.
- `./mvnw spotless:apply -Pcheck -T1C`: passed with no file changes.
- `./mvnw checkstyle:check -Pcheck -T1C`: passed with 0 violations.
AI assistance disclosure:
- Tool: OpenAI Codex.
- Scope: `ConditionValueCompareOperatorGenerator.java` and `ConditionValueCompareOperatorGeneratorTest.java`.
- The contributor reviewed and verified the complete change.
---
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.
- [x] I have requested corresponding labels for the pull request.
- [ ] I have passed the full Maven check locally: `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
- [x] Documentation changes are not required because this does not change public APIs or configuration.
- [x] I have added corresponding unit tests for my changes.
- [x] A release-note update is not required for this focused routing correction.
- [x] I have disclosed the tool and affected scope for material AI assistance as required by the [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 incorrect range routing for right-side sharding columns [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu merged PR #39534:
URL: https://github.com/apache/shardingsphere/pull/39534
--
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 incorrect range routing for right-side sharding columns [shardingsphere]
Posted by "Gimini-3 (via GitHub)" <gi...@apache.org>.
Gimini-3 commented on PR #39534:
URL: https://github.com/apache/shardingsphere/pull/39534#issuecomment-5383931373
Addressed in c8d06aef903. The generator now requires a direct column operand after supported normalization and returns no range condition for nested or derived operands such as `100 < sharding_col + 1`, preserving broadcast routing. Added condition-engine regression coverage. The focused suite passed 28 tests; sharding-core completed 868 tests with 0 failures/errors and 1 skipped. Spotless and Checkstyle also passed.
--
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 incorrect range routing for right-side sharding columns [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu commented on PR #39534:
URL: https://github.com/apache/shardingsphere/pull/39534#issuecomment-6099571016
Please resolve conflicts
--
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 incorrect range routing for right-side sharding columns [shardingsphere]
Posted by "Gimini-3 (via GitHub)" <gi...@apache.org>.
Gimini-3 commented on PR #39534:
URL: https://github.com/apache/shardingsphere/pull/39534#issuecomment-5383872601
Addressed in 640df1530fd. Equality predicates now skip range-specific BINARY checks, and the column side is determined once and reused. With JDK 21.0.12.1, C2, Epsilon GC, and six JMH forks, the baseline and candidate medians were 23.585 and 24.033 ns/op (+1.90%), with 120.000 B/op for both. The 27 focused tests and all 867 sharding-core tests passed.
--
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 incorrect range routing for right-side sharding columns [shardingsphere]
Posted by "Gimini-3 (via GitHub)" <gi...@apache.org>.
Gimini-3 commented on PR #39534:
URL: https://github.com/apache/shardingsphere/pull/39534#issuecomment-5378073102
Addressed in f9bef17d058. Right-side BINARY-wrapped sharding columns now preserve broadcast routing, with regression coverage added in `WhereClauseShardingConditionEngineTest`.
--
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 incorrect range routing for right-side sharding columns [shardingsphere]
Posted by "Gimini-3 (via GitHub)" <gi...@apache.org>.
Gimini-3 commented on PR #39534:
URL: https://github.com/apache/shardingsphere/pull/39534#issuecomment-5994563056
Addressed the three coding-standard findings in b370e0b107c. Removed unnecessary line wrapping, reordered the new private methods by call order, and changed the two emptiness-only local variables to Collection<ShardingCondition>. The focused unit tests passed. Targeted Spotless and Checkstyle also passed with zero violations.
--
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 incorrect range routing for right-side sharding columns [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu commented on PR #39534:
URL: https://github.com/apache/shardingsphere/pull/39534#issuecomment-5385892962
Please fix the GitHub action first
--
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 incorrect range routing for right-side sharding columns [shardingsphere]
Posted by "Gimini-3 (via GitHub)" <gi...@apache.org>.
Gimini-3 commented on PR #39534:
URL: https://github.com/apache/shardingsphere/pull/39534#issuecomment-6117065954
Resolved the merge conflicts with the current `master` and pushed cdd305773f3. This also includes the Spotless blank-line fix from f58ac10a621.
On the merged candidate, targeted Spotless selected all three changed Java files and found no changes needed, Checkstyle reported 0 violations, and the focused generator and condition-engine tests passed (40 tests, 0 failures/errors) with JDK 25. GitHub now reports the PR as conflict-free (`mergeable: true`).
The full Maven check was not run locally. Please re-review when convenient; CI and the remaining merge requirements still need to complete.
--
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 incorrect range routing for right-side sharding columns [shardingsphere]
Posted by "Gimini-3 (via GitHub)" <gi...@apache.org>.
Gimini-3 commented on PR #39534:
URL: https://github.com/apache/shardingsphere/pull/39534#issuecomment-5453224735
The failed E2E job reports MySQL “Too many connections,” while the CI job includes Maven artifact-lock timeouts. Could you please rerun the failed jobs?
--
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