sunchao commented on PR #36995: URL: https://github.com/apache/spark/pull/36995#issuecomment-1226134733
In general, let's say a V2 transform function maps a key to a value, given a set of keys, the value space should always be <= the key space. Therefore, it's seems better for Spark to shuffle the records based on the keys, while still uses the V2 transform function provided to determine the actual partition/bucket a record should belong to. Maybe we can introduce a special case for `KeyGroupedPartitioning` in `ShuffleExchangeExec`, which only consider keys, rather values after V2 transform function evaluation, when computing hash and deciding the partition ID for an input record. -- 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]
