We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93d094f commit cb23bd7Copy full SHA for cb23bd7
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/csvExpressions.scala
@@ -79,6 +79,10 @@ case class CsvToStructs(
79
lazy val converter = (rows: Iterator[InternalRow]) => {
80
if (rows.hasNext) {
81
rows.next()
82
+ val result = rows.next
83
+ // CSV's parser produces one record only.
84
+ assert(!rows.hasNext)
85
+ result
86
} else {
87
throw new IllegalArgumentException("Expected one row from CSV parser.")
88
}
0 commit comments