WweiL commented on code in PR #41129:
URL: https://github.com/apache/spark/pull/41129#discussion_r1190645274
##########
connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/streaming/DataStreamWriter.scala:
##########
@@ -202,6 +206,21 @@ final class DataStreamWriter[T] private[sql] (ds:
Dataset[T]) extends Logging {
this
}
+ /**
+ * Sets the output of the streaming query to be processed using the provided
writer object.
+ * object. See [[org.apache.spark.sql.ForeachWriter]] for more details on
the lifecycle and
+ * semantics.
+ * @since 3.5.0
+ */
+ def foreach(writer: ForeachWriter[T]): DataStreamWriter[T] = {
+ val serialized = Utils.serialize(writer)
Review Comment:
Serialize an arbitrary class instance directly?
--
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]