cloud-fan commented on code in PR #53872:
URL: https://github.com/apache/spark/pull/53872#discussion_r2730715560


##########
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:
   ah yea, we can add a `private[sql] object DataStreamReader` in `sql/api`. I 
think in the future we should also have a `abstract class DataStreamReader` as 
the common parent class, similar to `abstract class DataFrameReader`



-- 
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]

Reply via email to