[
https://issues.apache.org/jira/browse/PARQUET-132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14212317#comment-14212317
]
Tom White commented on PARQUET-132:
-----------------------------------
We should change it to {{AvroParquetInputFormat<T>}} so that we can support
Avro reflect in the future (see
https://github.com/Parquet/parquet-mr/pull/308). If we changed it to
{{AvroParquetInputFormat<T extends IndexedRecord>}} then we can't at a later
point change it to {{AvroParquetInputFormat<T>}}, because adding a type
parameter is compatible, while changing the bounds of one is not (see
https://wiki.eclipse.org/Evolving_Java-based_APIs_2#Evolving_API_Classes).
If we don't do the reflect work at this point, we could throw a runtime
exception if T is not an IndexedRecord.
> AvroParquetInputFormat should use a parameterized type
> ------------------------------------------------------
>
> Key: PARQUET-132
> URL: https://issues.apache.org/jira/browse/PARQUET-132
> Project: Parquet
> Issue Type: Bug
> Reporter: Ryan Blue
>
> The {{AvroParquetInputFormat}} currently extends
> {{ParquetInputFormat<IndexedRecord>}}, which works for regular MR cases. But
> Spark's {{hadoopRDD}} and
> [{{newAPIHadoopRDD}}|https://people.apache.org/~pwendell/spark-1.1.0-rc3-docs/api/java/org/apache/spark/SparkContext.html#newAPIHadoopRDD(org.apache.hadoop.conf.Configuration,
> java.lang.Class, java.lang.Class, java.lang.Class)] methods (correctly)
> create a RDD with the types from the InputFormat. This means that the RDD
> always uses {{IndexedRecord}} rather than the correct type.
> The {{AvroParquetInputFormat}} should be {{AvroParquetInputFormat<T extends
> IndexedRecord> extends ParquetInputFormat<T>}}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)