Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-11792] [SQL] [FOLLOW-UP] Change SizeEstimation to KnownSizeEstimation and make estimatedSize return Long instead of Option[Long] #9813

Closed
wants to merge 1 commit into from

Conversation

yhuai
Copy link
Contributor

@yhuai yhuai commented Nov 18, 2015

https://issues.apache.org/jira/browse/SPARK-11792

The main changes include:

  • Renaming SizeEstimation to KnownSizeEstimation. Hopefully this new name has more information.
  • Making estimatedSize return Long instead of Option[Long].
  • In UnsaveHashedRelation, estimatedSize will delegate the work to SizeEstimator if we have not created a BytesToBytesMap.

Since we will put UnsaveHashedRelation to BlockManager, it is generally good to let it provide a more accurate size estimation. Also, if we do not put BytesToBytesMap directly into BlockerManager, I feel it is not really necessary to make BytesToBytesMap extends KnownSizeEstimation.

@yhuai
Copy link
Contributor Author

yhuai commented Nov 18, 2015

@davies how about this version?

@davies
Copy link
Contributor

davies commented Nov 18, 2015

LGTM

@SparkQA
Copy link

SparkQA commented Nov 18, 2015

Test build #46219 has finished for PR 9813 at commit 329c72f.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@yhuai
Copy link
Contributor Author

yhuai commented Nov 18, 2015

Thanks! Merging to master and branch 1.6.

@asfgit asfgit closed this in 6f99522 Nov 18, 2015
asfgit pushed a commit that referenced this pull request Nov 18, 2015
…imation and make estimatedSize return Long instead of Option[Long]

https://issues.apache.org/jira/browse/SPARK-11792

The main changes include:
* Renaming `SizeEstimation` to `KnownSizeEstimation`. Hopefully this new name has more information.
* Making `estimatedSize` return `Long` instead of `Option[Long]`.
* In `UnsaveHashedRelation`, `estimatedSize` will delegate the work to `SizeEstimator` if we have not created a `BytesToBytesMap`.

Since we will put `UnsaveHashedRelation` to `BlockManager`, it is generally good to let it provide a more accurate size estimation. Also, if we do not put `BytesToBytesMap` directly into `BlockerManager`, I feel it is not really necessary to make `BytesToBytesMap` extends `KnownSizeEstimation`.

Author: Yin Huai <yhuai@databricks.com>

Closes #9813 from yhuai/SPARK-11792-followup.

(cherry picked from commit 6f99522)
Signed-off-by: Yin Huai <yhuai@databricks.com>
srowen pushed a commit that referenced this pull request Nov 24, 2021
### What changes were proposed in this pull request?
Followup #9813

### Why are the changes needed?
Fix scaladoc.

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?

Existing tests.

Closes #34692 from pan3793/SPARK-11792.

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Sean Owen <srowen@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants