diff options
author | Liang-Chi Hsieh <simonh@tw.ibm.com> | 2016-04-11 19:06:38 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2016-04-11 19:06:38 -0700 |
commit | 26d7af9119a73d851c86314b4a207c0bfe437082 (patch) | |
tree | 6d09911f13f92636c3ba845af8c36bf74847e274 /sql | |
parent | 6f27027d96ada29d8bb1d626f2cc7c856df3d597 (diff) | |
download | spark-26d7af9119a73d851c86314b4a207c0bfe437082.tar.gz spark-26d7af9119a73d851c86314b4a207c0bfe437082.tar.bz2 spark-26d7af9119a73d851c86314b4a207c0bfe437082.zip |
[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.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetRelation.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetRelation.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetRelation.scala index ca6803b737..bcb2b2de13 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetRelation.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetRelation.scala @@ -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]] } } |