Skip to content
Closed
Changes from 1 commit
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 @@ -298,11 +298,15 @@ case class InsertIntoParquetTable(
val committer = format.getOutputCommitter(hadoopContext)
committer.setupTask(hadoopContext)
val writer = format.getRecordWriter(hadoopContext)
while (iter.hasNext) {
val row = iter.next()
writer.write(null, row)
try {
while (iter.hasNext) {
val row = iter.next()
writer.write(null, row)
}
}
finally {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you put the finally on the same line as the previous } ? thanks.

writer.close(hadoopContext)
}
writer.close(hadoopContext)
committer.commitTask(hadoopContext)
return 1
}
Expand Down