Skip to content
Snippets Groups Projects
Commit 26d7af91 authored by Liang-Chi Hsieh's avatar Liang-Chi Hsieh Committed by Reynold Xin
Browse files

[SPARK-14520][SQL] Use correct return type in VectorizedParquetInputFormat

## What changes were proposed in this pull request?
JIRA: https://issues.apache.org/jira/browse/SPARK-14520

`VectorizedParquetInputFormat` inherits `ParquetInputFormat` and overrides `createRecordReader`. However, its overridden `createRecordReader` returns a `ParquetRecordReader`. It should return a `RecordReader`. Otherwise, `ClassCastException` will be thrown.

## How was this patch tested?

Existing tests.

Author: Liang-Chi Hsieh <simonh@tw.ibm.com>

Closes #12292 from viirya/fix-vectorized-input-format.
parent 6f27027d
No related branches found
No related tags found
No related merge requests found
......@@ -476,8 +476,8 @@ private[sql] class DefaultSource
final class VectorizedParquetInputFormat extends ParquetInputFormat[InternalRow] {
override def createRecordReader(
inputSplit: InputSplit,
taskAttemptContext: TaskAttemptContext): ParquetRecordReader[InternalRow] = {
new VectorizedParquetRecordReader().asInstanceOf[ParquetRecordReader[InternalRow]]
taskAttemptContext: TaskAttemptContext): RecordReader[Void, InternalRow] = {
new VectorizedParquetRecordReader().asInstanceOf[RecordReader[Void, InternalRow]]
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment