attilapiros commented on a change in pull request #24157: 
[WIP][SPARK-27216][CORE] Kryo serialization with RoaringBitmap
URL: https://github.com/apache/spark/pull/24157#discussion_r267370638
 
 

 ##########
 File path: 
core/src/test/scala/org/apache/spark/serializer/KryoSerializerSuite.scala
 ##########
 @@ -565,6 +565,20 @@ class KryoSerializerAutoResetDisabledSuite extends 
SparkFunSuite with SharedSpar
     assert(serInstance.deserialize[Any](serObj) === (obj))
     assert(serInstance.deserialize[Any](byteBuffer) === (obj))
   }
+
+  test("SPARK-27216: kryo serialization with RoaringBitmap") {
+    val bitmap = new RoaringBitmap
+    bitmap.add(1787)
+
+    val safeSer = new KryoSerializer(conf).newInstance()
+    val bitmap2 : RoaringBitmap = 
safeSer.deserialize(safeSer.serialize(bitmap))
+    assert(bitmap2.equals(bitmap))
+
+    conf.set("spark.kryo.unsafe", "true")
 
 Review comment:
   You are changing the `conf` which also used by other tests within the suite 
and now the execution order of these tests are important. If the test execution 
starts with this test and others are executed latter they might break.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to