Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/7948#discussion_r36272385
--- Diff:
sql/core/src/main/java/org/apache/spark/sql/execution/UnsafeKVExternalSorter.java
---
@@ -82,8 +82,15 @@ public UnsafeKVExternalSorter(StructType keySchema,
StructType valueSchema,
pageSizeBytes);
} else {
// Insert the records into the in-memory sorter.
+ // We will use the number of elements in the map as the initialSize
of the
+ // UnsafeInMemorySorter. Because UnsafeInMemorySorter does not
accept 0 as the initialSize,
+ // we will use 1 as its initial size if the map is empty.
+ int initialSoeterSize = map.numElements();
--- End diff --
Typo in this variable name.
---
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]