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

    https://github.com/apache/spark/pull/20727#discussion_r173639748
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/HadoopFileLinesReader.scala
 ---
    @@ -30,9 +31,19 @@ import 
org.apache.hadoop.mapreduce.task.TaskAttemptContextImpl
     /**
      * An adaptor from a [[PartitionedFile]] to an [[Iterator]] of [[Text]], 
which are all of the lines
      * in that file.
    + *
    + * @param file A part (i.e. "block") of a single file that should be read 
line by line.
    + * @param lineSeparator A line separator that should be used for each 
line. If the value is `None`,
    + *                      it covers `\r`, `\r\n` and `\n`.
    + * @param conf Hadoop configuration
      */
     class HadoopFileLinesReader(
    -    file: PartitionedFile, conf: Configuration) extends Iterator[Text] 
with Closeable {
    +    file: PartitionedFile,
    +    lineSeparator: Option[String],
    +    conf: Configuration) extends Iterator[Text] with Closeable {
    --- End diff --
    
    Yup, I am sorry if I wasn't clear. I mean [the doc 
describes](https://hadoop.apache.org/docs/r2.7.1/api/index.html?org/apache/hadoop/io/Text.html):
    
    > This class stores text using standard UTF8 encoding.
    
    I was wondering if that's a official way to use `Text` because that sounds 
rather an informal workaround.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to