rangadi commented on code in PR #41969:
URL: https://github.com/apache/spark/pull/41969#discussion_r1262172699
##########
connector/connect/common/src/main/protobuf/spark/connect/commands.proto:
##########
@@ -215,15 +215,24 @@ message WriteStreamOperationStart {
}
StreamingForeachWriter foreach_writer = 13;
+ StreamingForeachFunction foreach_batch = 14;
Review Comment:
Replaced.
##########
connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/streaming/StreamingQuerySuite.scala:
##########
@@ -292,3 +310,14 @@ class TestForeachWriter[T] extends ForeachWriter[T] {
case class TestClass(value: Int) {
override def toString: String = value.toString
}
+
+object StreamingQuerySuite {
+
+ // A foreach batch function for use in test above. Stores the count of
records in a temp view.
+ def foreachBatchFnForTest1(df: DataFrame, batchId: Long): Unit = {
+ val count = df.count()
+ df.sparkSession
+ .createDataFrame(Seq((batchId, count)))
+ .createOrReplaceTempView("foreachBatchTest1")
+ }
+}
Review Comment:
Fixed.
--
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]