panbingkun commented on code in PR #45776:
URL: https://github.com/apache/spark/pull/45776#discussion_r1549250502
##########
sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala:
##########
@@ -766,6 +778,15 @@ class DataFrameReader private[sql](sparkSession:
SparkSession) extends Logging {
}
}
+ /**
+ * A convenient function for paths validation in APIs.
+ */
+ private def assertNonEmptyPaths(paths: String*): Unit = {
+ if (userSpecifiedSchema.isEmpty) {
+ require(paths.nonEmpty, "The paths cannot be empty")
Review Comment:
> I am actually still not sure on this. What about `DataFrameReader.load()`?
I feel like it's better to delegate this check to DataSources themselves.
`DataFrameReader.load()`
<img width="1015" alt="image"
src="https://github.com/apache/spark/assets/15246973/135a7936-7cce-4c60-8c70-280e4cc7538f">
--
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]