You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Cheng Lian (JIRA)" <ji...@apache.org> on 2015/08/11 06:47:45 UTC

[jira] [Resolved] (SPARK-9340) CatalystSchemaConverter and CatalystRowConverter don't handle unannotated repeated fields correctly

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

Cheng Lian resolved SPARK-9340.
-------------------------------
       Resolution: Fixed
    Fix Version/s: 1.5.0

Issue resolved by pull request 8070
[https://github.com/apache/spark/pull/8070]

> CatalystSchemaConverter and CatalystRowConverter don't handle unannotated repeated fields correctly
> ---------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-9340
>                 URL: https://issues.apache.org/jira/browse/SPARK-9340
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.2.0, 1.3.0, 1.4.0, 1.5.0
>            Reporter: Damian Guy
>            Assignee: Cheng Lian
>             Fix For: 1.5.0
>
>         Attachments: ParquetTypesConverterTest.scala
>
>
> SPARK-6776 and SPARK-6777 followed {{parquet-avro}} to implement backwards-compatibility rules defined in {{parquet-format}} spec. However, both Spark SQL and {{parquet-avro}} neglected the following statement in {{parquet-format}}:
> {quote}
> This does not affect repeated fields that are not annotated: A repeated field that is neither contained by a {{LIST}}- or {{MAP}}-annotated group nor annotated by {{LIST}} or {{MAP}} should be interpreted as a required list of required elements where the element type is the type of the field.
> {quote}
> One of the consequences is that, Parquet files generated by {{parquet-protobuf}} containing unannotated repeated fields are not correctly converted to Catalyst arrays.
> For example, the following Parquet schema
> {noformat}
> message root {
>   repeated int32 f1
> }
> {noformat}
>  should be converted to
> {noformat}
> StructType(StructField("f1", ArrayType(IntegerType, containsNull = false), nullable = false) :: Nil)
> {noformat}
> But now it triggers an {{AnalysisException}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org