fudianchn commented on PR #39243:
URL: https://github.com/apache/shardingsphere/pull/39243#issuecomment-5302549817

   Restriction implemented in 2db9cc84, following the first option 
(equality-only):
   
   - `unwrapBinaryOperator` now runs only for the equality operator. Range 
predicates (`>`, `>=`, `<`, `<=`) with BINARY operands keep the pre-PR 
behavior: no sharding condition is generated, so routing stays broadcast and no 
partition pruning happens on converted endpoints.
   - Regression coverage for the string sharding key + range algorithm scenario:
     - `ConditionValueCompareOperatorGeneratorTest`: BINARY with each range 
operator, on both column side and value side, asserts an empty condition (5 new 
tests).
     - `WhereClauseShardingConditionEngineTest`: a string sharding key with 
`BINARY column > '100'` produces no sharding condition end to end through the 
condition engine.
     - `ShardingStandardRouteEngineTest` with a new `VOLUME_RANGE` fixture 
rule: without sharding conditions, routing broadcasts to all 5 actual tables of 
the range algorithm, i.e. the pruning path is never entered.
   
   Verification on 2db9cc84: generator 19/19, where-clause engine 3/3, route 
engine 10/10 pass; project checkstyle passes. Mutation check: removing the 
equality gate makes the new range tests fail (5 failures), so the behavior 
stays locked.
   


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

Reply via email to