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

Zhenqiu Huang commented on FLINK-20248:
---------------------------------------

[~zouyunhe]
Thanks for reporting the issue. It is kind of duplicated with 
https://issues.apache.org/jira/browse/FLINK-20054. 
I am working on a fix. Thanks.

> `ParquetSchemaConverter` can not convert Array type to parquet Type
> -------------------------------------------------------------------
>
>                 Key: FLINK-20248
>                 URL: https://issues.apache.org/jira/browse/FLINK-20248
>             Project: Flink
>          Issue Type: Bug
>          Components: Formats (JSON, Avro, Parquet, ORC, SequenceFile)
>    Affects Versions: 1.11.2
>            Reporter: zouyunhe
>            Priority: Major
>
> Run a simple code  as below 
> {code:java}
> Type arraySchema = 
> ParquetSchemaConverter.toParquetType(Types.OBJECT_ARRAY(Types.INT), true);
> System.out.println(arraySchema);{code}
> which use `ParquetSchemaConverter` to convert array[Int] type to parquet 
> Type,  and the exception will throw
> {code:java}
> java.lang.ClassCastException: org.apache.parquet.schema.PrimitiveType cannot 
> be cast to org.apache.parquet.schema.GroupTypejava.lang.ClassCastException: 
> org.apache.parquet.schema.PrimitiveType cannot be cast to 
> org.apache.parquet.schema.GroupType
>  at 
> org.apache.flink.formats.parquet.utils.ParquetSchemaConverter.convertField(ParquetSchemaConverter.java:374)
>  at 
> org.apache.flink.formats.parquet.utils.ParquetSchemaConverter.toParquetType(ParquetSchemaConverter.java:74)
>  at 
> org.apache.flink.formats.parquet.utils.ParquetSchemaConverterTest.testArrayTypeConversion(ParquetSchemaConverterTest.java:113)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
> at 
> {code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to