jonasHanhan opened a new pull request, #37857: URL: https://github.com/apache/shardingsphere/pull/37857
## Summary Prevent SELECT DISTINCT from being rewritten into per-shard DISTINCT + UNION ALL, which breaks global deduplication across shards. ## Issue Fixes #37852. ## Changes - Skip aggregate rewrite when DISTINCT is present to preserve global semantics. - Add rewrite-layer test to ensure DISTINCT queries are not aggregated. - Add merge-layer test to ensure DISTINCT is handled via global deduplication. ## Tests - ./mvnw -pl infra/rewrite/core -am -DskipITs -Dspotless.skip=true -Dtest=RouteSQLRewriteEngineTest -Dsurefire.failIfNoSpecifiedTests=false test - ./mvnw -pl features/sharding/core -am -DskipITs -Dspotless.skip=true -Dtest=ShardingDQLResultMergerTest -Dsurefire.failIfNoSpecifiedTests=false test -- 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]
