ggjh-159 opened a new pull request, #13409: URL: https://github.com/apache/gluten/pull/13409
issue: #12805 ## What changes are proposed in this pull request? Keyed stream exchange in `StreamExecExchange` now emits `KeyGroupPartitionFunctionSpec` (from velox4j) instead of `HashPartitionFunctionSpec`. The new spec routes each row to the partition that owns the row's key group — hash the key columns through the same `VectorHasher` chain the state backend probes keys with, fold to a key group (`hash % maxParallelism`), then map the key group to a partition by contiguous ranges (`keyGroup * numPartitions / maxParallelism`, the dual of Flink's `KeyGroupRangeAssignment.computeKeyGroupRangeForOperatorIndex`). `hash % numPartitions` scattered a key's records and its state across different subtasks; the range mapping keeps them together and keeps a rescale re-split a range split instead of a full reshuffle. `maxParallelism` is currently sent as Flink's `DEFAULT_LOWER_BOUND_MAX_PARALLELISM` (128), which matches Flink's derived default when parallelism is at most 128 and no explicit max-parallelism is set. Plumbing the real configured value through is follow-up wiring. ## How was this patch tested? - `mvn test` on gluten-flink (ut module; nexmark tests tolerate queries hitting operators not yet migrated to the keyed-state framework). -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
