Github user srowen commented on the issue:
https://github.com/apache/spark/pull/15736
To recap some of my feedback here, I think this will be a fine change but
it can be refactored further.
I think we can refactor this logic that appears twice in one place, perhaps
in `object WritablePartitionedPairCollection`? that's where its support code
currently lives, anyway.
Since the two methods there are only used by these call sites that are
changing, they can be 'inlined' into the one common implementation, which might
open up more optimization.
It'd be nice to fix the subtraction issue while we're here unless someone
is convinced the difference can never overflow.
`keyComparator.get` can be lifted out of the compare() method.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]