Skip to content

Commit cb23bd7

Browse files
authored
Address comments (#12)
1 parent 93d094f commit cb23bd7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/csvExpressions.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ case class CsvToStructs(
7979
lazy val converter = (rows: Iterator[InternalRow]) => {
8080
if (rows.hasNext) {
8181
rows.next()
82+
val result = rows.next
83+
// CSV's parser produces one record only.
84+
assert(!rows.hasNext)
85+
result
8286
} else {
8387
throw new IllegalArgumentException("Expected one row from CSV parser.")
8488
}

0 commit comments

Comments
 (0)