HyukjinKwon commented on code in PR #47347: URL: https://github.com/apache/spark/pull/47347#discussion_r1677237810
########## mllib/src/main/scala/org/apache/spark/mllib/classification/NaiveBayes.scala: ########## @@ -198,10 +198,10 @@ object NaiveBayesModel extends Loader[NaiveBayesModel] { val metadata = compact(render( ("class" -> thisClassName) ~ ("version" -> thisFormatVersion) ~ ("numFeatures" -> data.theta(0).length) ~ ("numClasses" -> data.pi.length))) - sc.parallelize(Seq(metadata), 1).saveAsTextFile(metadataPath(path)) + spark.createDataFrame(Seq(Tuple1(metadata))).write.text(metadataPath(path)) Review Comment: Here there are some additional changes piggybacked together to switch to Text datasource on the top of `reparition(1)` removal. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org