Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/18556#discussion_r126045375
--- 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) {
throw new IOException("No input path specified for libsvm data")
--- End diff --
I could not use `AnalysisException` here for package access modifier. Also,
I could not remove this line to defer the message as I am not sure if saying
"Unable to infer schema ... It must be specified manually." Is a proper message
here -
@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]