[ 
https://issues.apache.org/jira/browse/PARQUET-132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14212696#comment-14212696
 ] 

Ryan Blue commented on PARQUET-132:
-----------------------------------

Thanks for taking a look, Tom. I've updated the PR to add 
{{AvroParquetInputFormat<T>}} as you suggested. We don't actually get a 
reference to the type at runtime to inspect and throw an exception, so we will 
have to do that elsewhere. That update can wait until we add support for 
reflect.

> 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)

Reply via email to