spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hvanhovell <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-14724] Use radix sort for shuffles and ...
Date Tue, 19 Apr 2016 16:58:08 GMT
Github user hvanhovell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12490#discussion_r60268804
  
    --- Diff: sql/core/src/main/java/org/apache/spark/sql/execution/UnsafeKVExternalSorter.java
---
    @@ -85,13 +85,15 @@ public UnsafeKVExternalSorter(
             recordComparator,
             prefixComparator,
             /* initialSize */ 4096,
    -        pageSizeBytes);
    +        pageSizeBytes,
    +        keySchema.length() == 1 && SortPrefixUtils.canSortFullyWithPrefix(keySchema.apply(0)));
         } else {
           // During spilling, the array in map will not be used, so we can borrow that and
use it
           // as the underline array for in-memory sorter (it's always large enough).
           // Since we will not grow the array, it's fine to pass `null` as consumer.
           final UnsafeInMemorySorter inMemSorter = new UnsafeInMemorySorter(
    -        null, taskMemoryManager, recordComparator, prefixComparator, map.getArray());
    +        null, taskMemoryManager, recordComparator, prefixComparator, map.getArray(),
    +        false /* TODO(ekl) is there enough existing memory to do radix sort here? */);
    --- End diff --
    
    I suppose we can't fallback to Tim sort in an elegant way?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message