jiananxu opened a new issue, #37125: URL: https://github.com/apache/shardingsphere/issues/37125
## Environment - **Spring Boot Version**: 3.3.13 - **ShardingJDBC Version**: 5.5.0 - **Database**: Dameng Database (Oracle-like syntax) - **Sharding Configuration**: 4 tables with pagination rules ## Problem Description When executing pagination queries using Spring Data's `PageRequest`, the expected in-memory merge query does not trigger, resulting in incorrect pagination behavior. **Code Example:** ```java PageRequest page = PageRequest.of(0, 5, Sort.by(Sort.Direction.DESC, "id")); Page<BusinessLog> certs = businessLogDao.findAll(page); ``` **Expected Result:** - Should return 5 records (as specified in page size) - Results should be merged from all 4 sharded tables and sorted by ID in descending order **Actual Result:** - Returns 20 records (5 from each of the 4 shards, without proper merging) - No in-memory merge operation appears to be executed ## Key Symptoms 1. Pagination size is ignored - returns 20 records instead of 5 2. Sorting may not be properly applied across all shards 3. No evidence of in-memory result merging ## Questions & Assistance Needed ### 1. Configuration Issues - Are there specific configurations required to enable in-memory merging for pagination in ShardingJDBC 5.5.0? - Could there be compatibility issues with Dameng database? ### 2. Manual Triggering - Is there a way to manually trigger or force in-memory merge queries? - Are there specific APIs or configurations to enforce result merging? ### 3. Troubleshooting Guidance - What would be the recommended approach to debug this issue? - Are there known limitations with Spring Data JPA repository methods and ShardingJDBC pagination? ### 4. Database Specifics - Could the Dameng database (Oracle-like) require special handling? - Are there dialect configurations or compatibility settings needed? Thank you for your assistance! -- 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]
