hvanhovell commented on code in PR #53872:
URL: https://github.com/apache/spark/pull/53872#discussion_r2730621245
##########
sql/connect/common/src/main/scala/org/apache/spark/sql/connect/DataStreamReader.scala:
##########
@@ -18,14 +18,40 @@
package org.apache.spark.sql.connect
import scala.jdk.CollectionConverters._
+import scala.util.matching.Regex
-import org.apache.spark.annotation.Evolving
+import org.apache.spark.annotation.{Evolving, Experimental}
import org.apache.spark.connect.proto.Read.DataSource
+import org.apache.spark.sql.AnalysisException
import org.apache.spark.sql.connect.ConnectConversions._
+import org.apache.spark.sql.connect.DataStreamReader.validateSourceName
import org.apache.spark.sql.errors.DataTypeErrors
import org.apache.spark.sql.streaming
import org.apache.spark.sql.types.StructType
+/**
+ * Validation utilities for DataStreamReader in Connect.
+ *
+ * Note: This object duplicates validation logic from
+ * [[org.apache.spark.sql.catalyst.streaming.StreamingSourceValidation]]
because
+ * sql/connect/common does not depend on sql/catalyst. If you modify this
validation, ensure the
+ * logic stays synchronized with StreamingSourceValidation.
+ */
+private object DataStreamReader {
Review Comment:
I agree with Wenchen, we should not duplicate code. However AFAICT this is
used in classic as well, for that to work you have to put it in `sql/api`. Just
place it in the parent interface (or its companion).
--
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]