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

    https://github.com/apache/spark/pull/9788#discussion_r45166467
  
    --- Diff: core/src/main/scala/org/apache/spark/util/SizeEstimator.scala ---
    @@ -32,6 +32,16 @@ import org.apache.spark.annotation.DeveloperApi
     import org.apache.spark.util.collection.OpenHashSet
     
     /**
    + * A trait that allows a class to give [[SizeEstimator]] more accurate 
size estimation.
    + * When a class extends it, [[SizeEstimator]] will query the 
`estimatedSize` first.
    + * If `estimatedSize` does not return [[None]], [[SizeEstimator]] will use 
the returned size
    + * as the size of the object. Otherwise, [[SizeEstimator]] will do the 
estimation work.
    + */
    +private[spark] trait SizeEstimation {
    +  def estimatedSize: Option[Long]
    --- End diff --
    
    I'd like to get it merged first if there is no fundamental issue. So, we 
can unblock the preview package. I can make the change if we prefer to change 
`BytesToBytesMap` instead of `UnsafeHashedRelation`. I agree returning a 
`Option` is weird. But, I feel if it is possible, we should prefer changing 
`UnsafeHashedRelation` because it is the one used as the broadcast variable.


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