jinchengchenghh commented on code in PR #11208:
URL:
https://github.com/apache/incubator-gluten/pull/11208#discussion_r2571650193
##########
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:
Do we need to use randomBytes, can we use a fixed empty bytes with size 50
--
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]