Github user advancedxy commented on a diff in the pull request:
https://github.com/apache/spark/pull/4783#discussion_r29498301
--- Diff:
core/src/test/scala/org/apache/spark/util/SizeEstimatorSuite.scala ---
@@ -59,6 +68,22 @@ class SizeEstimatorSuite
assertResult(24)(SizeEstimator.estimate(new DummyClass4(null)))
assertResult(48)(SizeEstimator.estimate(new DummyClass4(new
DummyClass3)))
}
+
+ test("primitive wrapper objects") {
+ assertResult(16)(SizeEstimator.estimate(new java.lang.Boolean(true)))
+ assertResult(16)(SizeEstimator.estimate(new java.lang.Byte("1")))
+ assertResult(16)(SizeEstimator.estimate(new java.lang.Character('1')))
+ assertResult(16)(SizeEstimator.estimate(new java.lang.Short("1")))
+ assertResult(16)(SizeEstimator.estimate(new java.lang.Integer(1)))
+ assertResult(24)(SizeEstimator.estimate(new java.lang.Long(1)))
+ assertResult(16)(SizeEstimator.estimate(new java.lang.Float(1.0)))
--- End diff --
Thanks. I do know 1.0 is a double. Maybe I didn't think clearly when I was
writing the test cases. Just leave it?
---
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]