Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,17 @@ private[sql] case class InMemoryRelation(
var rowCount = 0
while (rowIterator.hasNext && rowCount < batchSize) {
val row = rowIterator.next()

// Added for SPARK-6082. This assertion can be useful for scenarios when something
// like Hive TRANSFORM is used. The external data generation script used in TRANSFORM
// may result malformed rows, causing ArrayIndexOutOfBoundsException, which is somewhat
// hard to decipher.
assert(
row.size == columnBuilders.size,
s"""Row column number mismatch, expected ${output.size} columns, but got ${row.size}.
|Row content: $row
""".stripMargin)

var i = 0
while (i < row.length) {
columnBuilders(i).appendFrom(row, i)
Expand Down