You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/09/16 13:26:40 UTC

[GitHub] [spark] tomvanbussel commented on a change in pull request #29772: [SPARK-32900][CORE] Allow UnsafeExternalSorter to spill when there are nulls.

tomvanbussel commented on a change in pull request #29772:
URL: https://github.com/apache/spark/pull/29772#discussion_r489435297



##########
File path: core/src/test/java/org/apache/spark/util/collection/unsafe/sort/UnsafeExternalSorterSuite.java
##########
@@ -359,6 +359,38 @@ public void forcedSpillingWithReadIterator() throws Exception {
     assertSpillFilesWereCleanedUp();
   }
 
+  @Test
+  public void forcedSpillingNullsWithReadIterator() throws Exception {
+    final UnsafeExternalSorter sorter = newSorter();
+    long[] record = new long[100];
+    final int recordSize = record.length * 8;
+    final int n = (int) pageSizeBytes / recordSize * 3;
+    for (int i = 0; i < n; i++) {
+      sorter.insertRecord(record, Platform.LONG_ARRAY_OFFSET, recordSize, 0, true);

Review comment:
       Made every odd index non-null.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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