liupc commented on a change in pull request #23799: [SPARK-26892][CORE] Fix 
saveAsTextFile throws NullPointerException when null row present
URL: https://github.com/apache/spark/pull/23799#discussion_r257558839
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/rdd/RDD.scala
 ##########
 @@ -1492,6 +1492,13 @@ abstract class RDD[T: ClassTag](
    * Save this RDD as a text file, using string representations of elements.
    */
   def saveAsTextFile(path: String): Unit = withScope {
+    saveAsTextFile(path, null)
+  }
+
+  /**
+   * Save this RDD as a compressed text file, using string representations of 
elements.
+   */
+  def saveAsTextFile(path: String, codec: Class[_ <: CompressionCodec]): Unit 
= withScope {
     // https://issues.apache.org/jira/browse/SPARK-2075
     //
     // NullWritable is a `Comparable` in Hadoop 1.+, so the compiler cannot 
find an implicit
 
 Review comment:
   @maropu @srowen Here you all think we should remove this comment, why? I 
don't understand, could you explain it more? Thank you so much!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to