@@ -432,13 +432,14 @@ private[parquet] class CatalystSchemaConverter(
432432 // ArrayType and MapType (for Spark versions <= 1.4.x)
433433 // ===================================================
434434
435- // Spark 1.4.x and prior versions convert ArrayType with nullable elements into a 3-level
436- // LIST structure. This behavior mimics parquet-hive (1.6.0rc3). Note that this case is
437- // covered by the backwards-compatibility rules implemented in `isElementType()`.
435+ // Spark 1.4.x and prior versions convert `ArrayType` with nullable elements into a 3-level
436+ // `LIST` structure. This behavior is somewhat a hybrid of parquet-hive and parquet-avro
437+ // (1.6.0rc3): the 3-level structure is similar to parquet-hive while the 3rd level element
438+ // field name "array" is borrowed from parquet-avro.
438439 case ArrayType (elementType, nullable @ true ) if ! followParquetFormatSpec =>
439440 // <list-repetition> group <name> (LIST) {
440441 // optional group bag {
441- // repeated <element-type> element ;
442+ // repeated <element-type> array ;
442443 // }
443444 // }
444445 ConversionPatterns .listType(
@@ -447,8 +448,8 @@ private[parquet] class CatalystSchemaConverter(
447448 Types
448449 .buildGroup(REPEATED )
449450 // "array_element" is the name chosen by parquet-hive (1.7.0 and prior version)
450- .addField(convertField(StructField (" array_element " , elementType, nullable)))
451- .named(CatalystConverter . ARRAY_CONTAINS_NULL_BAG_SCHEMA_NAME ))
451+ .addField(convertField(StructField (" array " , elementType, nullable)))
452+ .named(" bag " ))
452453
453454 // Spark 1.4.x and prior versions convert ArrayType with non-nullable elements into a 2-level
454455 // LIST structure. This behavior mimics parquet-avro (1.6.0rc3). Note that this case is
0 commit comments