gaborgsomogyi commented on a change in pull request #23631: [SPARK-26649][SS]
Add DSv2 noop sink
URL: https://github.com/apache/spark/pull/23631#discussion_r250610281
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/noop/NoopDataSource.scala
##########
@@ -64,3 +72,16 @@ private[noop] object NoopWriter extends
DataWriter[InternalRow] {
override def abort(): Unit = {}
}
+private[noop] object NoopStreamingWriteSupport extends StreamingWriteSupport {
+ override def createStreamingWriterFactory(): StreamingDataWriterFactory =
+ NoopStreamingDataWriterFactory
+ override def commit(epochId: Long, messages: Array[WriterCommitMessage]):
Unit = {}
+ override def abort(epochId: Long, messages: Array[WriterCommitMessage]):
Unit = {}
+}
+
+private[noop] object NoopStreamingDataWriterFactory extends
StreamingDataWriterFactory {
+ override def createWriter(
+ partitionId: Int,
+ taskId: Long,
+ epochId: Long): DataWriter[InternalRow] = NoopWriter
+}
Review comment:
Yep, fixed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]