MaxGekk commented on a change in pull request #29984:
URL: https://github.com/apache/spark/pull/29984#discussion_r502243128
##########
File path: mllib/src/main/scala/org/apache/spark/mllib/util/MLUtils.scala
##########
@@ -105,13 +105,15 @@ object MLUtils extends Logging {
}
private[spark] def parseLibSVMFile(
- sparkSession: SparkSession, paths: Seq[String]): RDD[(Double,
Array[Int], Array[Double])] = {
+ sparkSession: SparkSession,
+ paths: Seq[String],
+ options: Map[String, String]): RDD[(Double, Array[Int], Array[Double])]
= {
val lines = sparkSession.baseRelationToDataFrame(
DataSource.apply(
sparkSession,
paths = paths,
className = classOf[TextFileFormat].getName,
- options = Map(DataSource.GLOB_PATHS_KEY -> "false")
+ options = options ++ Map(DataSource.GLOB_PATHS_KEY -> "false")
Review comment:
This is similar to CSV/JSON datasource:
https://github.com/apache/spark/blob/954cd9feaa1a3d4ad9a235811ae58e02a63e8386/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVDataSource.scala#L158
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]