Github user squito commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9661#discussion_r44726771
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/MapStatus.scala ---
    @@ -193,6 +198,11 @@ private[spark] object HighlyCompressedMapStatus {
         } else {
           0
         }
    -    new HighlyCompressedMapStatus(loc, numNonEmptyBlocks, emptyBlocks, 
avgSize)
    +    if (numNonEmptyBlocks < totalNumBlocks / 2) {
    +      new HighlyCompressedMapStatus(loc, numNonEmptyBlocks, 
nonEmptyBlocks, avgSize, isSparse = true)
    +    } else {
    +      new HighlyCompressedMapStatus(loc, numNonEmptyBlocks, emptyBlocks, 
avgSize, isSparse = false)
    --- End diff --
    
    (a) `isSparse` is not the right name and (b) we might not even need to 
bother with tracking empty vs. non-empty, after we see the results of calling 
`runOptimize`.  In fact, if they are the same, I'd suggest we change this code 
to consistently track nonEmpty blocks, just for clarity.


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

Reply via email to