nyaapa commented on code in PR #53122:
URL: https://github.com/apache/spark/pull/53122#discussion_r2591697694
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/python/streaming/BaseStreamingArrowWriterSuite.scala:
##########
@@ -95,4 +95,43 @@ class BaseStreamingArrowWriterSuite extends SparkFunSuite
with BeforeAndAfterEac
verify(writer, times(2)).writeBatch()
verify(arrowWriter, times(2)).reset()
}
+
+ test("test negative or zero arrowMaxRecordsPerBatch is unlimited") {
+ val root: VectorSchemaRoot = mock(classOf[VectorSchemaRoot])
+ val dataRow = mock(classOf[InternalRow])
+
+ // Test with negative value
+ transformWithStateInPySparkWriter = new BaseStreamingArrowWriter(
+ root, writer, -1, arrowMaxBytesPerBatch, arrowWriter)
+
+ // Write many rows (more than typical batch size)
Review Comment:
🤷 imo for a unit test there's some value in just testing basic assumptions,
even with a completely unrealistic limit of 10..
--
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]