ted-jenks commented on code in PR #39926:
URL: https://github.com/apache/spark/pull/39926#discussion_r1098487401


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/CSVExprUtils.scala:
##########
@@ -35,22 +35,11 @@ object CSVExprUtils {
     }
   }
 
-  def skipComments(iter: Iterator[String], options: CSVOptions): 
Iterator[String] = {
-    if (options.isCommentSet) {
-      val commentPrefix = options.comment.toString
-      iter.dropWhile { line =>

Review Comment:
   Could you help me understand why the behavior would change when switching 
the functions? `skipComments` is only used in `extractHeader(iter: 
Iterator[String], options: CSVOptions)` where it doesn't make a difference if 
`filter` or `dropWhile` is used. Is this an optimisation?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to