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

    https://github.com/apache/spark/pull/22676#discussion_r223593701
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/UnivocityParser.scala
 ---
    @@ -273,44 +274,47 @@ private[csv] object UnivocityParser {
           inputStream: InputStream,
           shouldDropHeader: Boolean,
           tokenizer: CsvParser): Iterator[Array[String]] = {
    -    convertStream(inputStream, shouldDropHeader, tokenizer)(tokens => 
tokens)
    +    val handleHeader: () => Unit =
    +      () => if (shouldDropHeader) tokenizer.parseNext
    --- End diff --
    
    This is used in schema inference path, where we don't check header. Here 
only it drops  the header.


---

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

Reply via email to