You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Flink Jira Bot (Jira)" <ji...@apache.org> on 2021/11/08 22:39:00 UTC

[jira] [Updated] (FLINK-20248) `ParquetSchemaConverter` can not convert Array type to parquet Type

     [ https://issues.apache.org/jira/browse/FLINK-20248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flink Jira Bot updated FLINK-20248:
-----------------------------------
      Labels: auto-deprioritized-major auto-deprioritized-minor  (was: auto-deprioritized-major stale-minor)
    Priority: Not a Priority  (was: Minor)

This issue was labeled "stale-minor" 7 days ago and has not received any updates so it is being deprioritized. If this ticket is actually Minor, please raise the priority and ask a committer to assign you the issue or revive the public discussion.


> `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: Not a Priority
>              Labels: auto-deprioritized-major, auto-deprioritized-minor
>
> 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.20.1#820001)