HyukjinKwon commented on code in PR #45776:
URL: https://github.com/apache/spark/pull/45776#discussion_r1545520867


##########
sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala:
##########
@@ -538,7 +539,10 @@ class DataFrameReader private[sql](sparkSession: 
SparkSession) extends Logging {
    * @since 2.0.0
    */
   @scala.annotation.varargs
-  def csv(paths: String*): DataFrame = format("csv").load(paths : _*)
+  def csv(paths: String*): DataFrame = {
+    require(paths.nonEmpty, "The paths cannot be empty")

Review Comment:
   While I agree with the intention of setting the behaviour down, I concern 
about behaviour changes. Empty Dataset is a concept existent, e.g., 
`SparkSession.emptyDataset`.



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