Github user tdas commented on a diff in the pull request:
https://github.com/apache/spark/pull/20097#discussion_r159112097
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/streaming/DataStreamReader.scala
---
@@ -167,6 +167,24 @@ final class DataStreamReader
private[sql](sparkSession: SparkSession) extends Lo
className = source,
options = extraOptions.toMap)
ds match {
+ case s: MicroBatchReadSupport =>
+ val tempReader = s.createMicroBatchReader(
+ java.util.Optional.ofNullable(userSpecifiedSchema.orNull),
+ Utils.createTempDir(namePrefix =
s"temporaryReader").getCanonicalPath,
+ options)
+ // Generate the V1 node to catch errors thrown within generation.
+ try {
+ StreamingRelation(v1DataSource)
+ } catch {
+ case e: UnsupportedOperationException
--- End diff --
can you link to the exception that this supposed to throw? do we really
have a check the message string to match? seems pretty brittle for something
this crucial item of checking whether something is supported.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]