zhztheplayer commented on code in PR #11208:
URL: 
https://github.com/apache/incubator-gluten/pull/11208#discussion_r2572013498


##########
backends-velox/src/test/scala/org/apache/spark/sql/execution/unsafe/UnsafeColumnarBuildSideRelationTest.scala:
##########
@@ -124,4 +167,14 @@ class UnsafeColumnarBuildSideRelationTest extends 
SharedSparkSession {
         sampleBytes.asInstanceOf[Array[AnyRef]]))
   }
 
+  test("Should throw OOM when off-heap memory is running out") {
+    // 500 MiB > 200 MiB so OOM should be thrown.
+    val relations = mutable.ListBuffer[UnsafeColumnarBuildSideRelation]()
+    assertThrows[OutOfMemoryException] {
+      for (i <- 0 until 10) {
+        relations += 
newUnsafeRelationWithHashMode(randomBytes(ByteUnit.MiB.toBytes(50).toInt))

Review Comment:
   Not really, we have to fill the byte array with non-zero data to guard the 
serde process.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to