Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18556#discussion_r126043309
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/source/libsvm/LibSVMRelation.scala ---
    @@ -89,18 +93,17 @@ private[libsvm] class LibSVMFileFormat extends 
TextBasedFileFormat with DataSour
           files: Seq[FileStatus]): Option[StructType] = {
         val libSVMOptions = new LibSVMOptions(options)
         val numFeatures: Int = libSVMOptions.numFeatures.getOrElse {
    -      // Infers number of features if the user doesn't specify (a valid) 
one.
    -      val dataFiles = files.filterNot(_.getPath.getName startsWith "_")
    -      val path = if (dataFiles.length == 1) {
    -        dataFiles.head.getPath.toUri.toString
    -      } else if (dataFiles.isEmpty) {
    +      if (files.isEmpty) {
    --- End diff --
    
    Btw, I think we can't defer the error message here as I guess it is not 
strictly schema inference. Also, I could not use `AnalysisException`  here due 
to package access identifier. - @cloud-fan 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to