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

   ## Overview
   
   This is the second PR (of 9 total) for the IN predicate optimization 
feature, integrating parameter filtering logic into RouteSQLRewriteEngine.
   
   ## Changes
   
   **Modified `RouteSQLRewriteEngine.java`**
   - Enhanced `getParameters()` method to call parameter filtering
   - Added `filterParametersIfNeeded()` method to detect and apply parameter 
filtering when ParameterFilterable tokens exist
   - Added `findParameterFilterableTokens()` method to identify tokens 
implementing ParameterFilterable interface
   - Added `applyParameterFiltering()` method to merge removed indices from 
multiple tokens and filter parameters
   
   **Added unit tests in `RouteSQLRewriteEngineTest.java`**
   - Test behavior when no filterable tokens exist
   - Test single token parameter filtering
   - Test multiple tokens with index merging
   - Test parameter order preservation after filtering
   
   ## Design Rationale
   
   - Zero performance impact when no filterable tokens exist (only a simple 
list traversal)
   - Supports multiple ParameterFilterable tokens with automatic index merging
   - Preserves parameter order for remaining parameters
   - Fully backward compatible - existing tokens continue to work without 
changes
   
   ## Related Issue
   
   Part of #36454 (2/9)
   
   ## Next Steps
   
   The next PR will introduce data structures (`ShardingInPredicateValue` and 
`ShardingInPredicateToken`) that utilize this parameter filtering 
infrastructure.
   


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