Skip to content

Commit 4dca939

Browse files
committed
For array type 2, don't take repeated type in computing repetition level.
1 parent 114a69b commit 4dca939

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetSchemaConverter.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ private[parquet] class ParquetSchemaConverter(
251251
val elementType = repeatedType.asGroupType().getType(0)
252252
val optional = elementType.isRepetition(OPTIONAL)
253253
val curPath = path ++ Seq(repeatedType.getName)
254-
val defLevel = messageType.getMaxDefinitionLevel(curPath: _*)
255-
val repLevel = messageType.getMaxRepetitionLevel(curPath: _*)
254+
val defLevel = messageType.getMaxDefinitionLevel(path: _*)
255+
val repLevel = messageType.getMaxRepetitionLevel(path: _*)
256256
val metadata = builder.putLong("defLevel", defLevel).putLong("repLevel", repLevel).build()
257257
ArrayType(convertField(elementType, messageType, curPath), containsNull = optional,
258258
metadata = metadata)

0 commit comments

Comments
 (0)