Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Change schema for array type from element to array_element
  • Loading branch information
Sephiroth-Lin committed Jul 3, 2015
commit ecd25477abd6735514ab48549a4a937bf6d00f42
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ private[parquet] class CatalystSchemaConverter(
field.name,
Types
.buildGroup(REPEATED)
.addField(convertField(StructField("element", elementType, nullable)))
.addField(convertField(StructField("array_element", elementType, nullable)))
.named(CatalystConverter.ARRAY_CONTAINS_NULL_BAG_SCHEMA_NAME))

// Spark 1.4.x and prior versions convert ArrayType with non-nullable elements into a 2-level
Expand All @@ -459,7 +459,7 @@ private[parquet] class CatalystSchemaConverter(
ConversionPatterns.listType(
repetition,
field.name,
convertField(StructField("element", elementType, nullable), REPEATED))
convertField(StructField("array_element", elementType, nullable), REPEATED))

// Spark 1.4.x and prior versions convert MapType into a 3-level group annotated by
// MAP_KEY_VALUE. This is covered by `convertGroupField(field: GroupType): DataType`.
Expand Down Expand Up @@ -490,7 +490,7 @@ private[parquet] class CatalystSchemaConverter(
.buildGroup(repetition).as(LIST)
.addField(
Types.repeatedGroup()
.addField(convertField(StructField("element", elementType, containsNull)))
.addField(convertField(StructField("array_element", elementType, containsNull)))
.named("list"))
.named(field.name)

Expand Down