cloud-fan commented on a change in pull request #30273:
URL: https://github.com/apache/spark/pull/30273#discussion_r519921569
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/streaming/sources/StreamingDataSourceV2Suite.scala
##########
@@ -195,6 +196,31 @@ class FakeNoWrite extends DataSourceRegister with
SimpleTableProvider {
}
}
+class FakeWriteSupportingExternalMetadata
+ extends DataSourceRegister
+ with TableProvider {
+ override def shortName(): String = "fake-write-supporting-external-metadata"
+
+ override def supportsExternalMetadata(): Boolean = true
+
+ override def inferSchema(options: CaseInsensitiveStringMap): StructType = {
+ throw new IllegalArgumentException(
+ "Data stream writer should not require inferring table schema the data
source supports" +
+ " external Metadata.")
+ }
+
+ override def getTable(
+ tableSchema: StructType,
+ partitioning: Array[Transform],
+ properties: util.Map[String, String]): Table = {
+ LastWriteOptions.options = new CaseInsensitiveStringMap(properties)
Review comment:
We don't check it. I think we can remove this line.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]