diff --git a/hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/io/storage/row/parquet/ParquetSchemaConverter.java b/hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/io/storage/row/parquet/ParquetSchemaConverter.java index 7cd7c300670e..8bd1a8488553 100644 --- a/hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/io/storage/row/parquet/ParquetSchemaConverter.java +++ b/hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/io/storage/row/parquet/ParquetSchemaConverter.java @@ -650,7 +650,7 @@ private static Type convertToParquetType( .addField( Types .repeatedGroup() - .addField(convertToParquetType("key", keyType, repetition)) + .addField(convertToParquetType("key", keyType, Type.Repetition.REQUIRED)) .addField(convertToParquetType("value", valueType, repetition)) .named("key_value")) .named(name); diff --git a/hudi-client/hudi-flink-client/src/test/java/org/apache/hudi/io/storage/row/parquet/TestParquetSchemaConverter.java b/hudi-client/hudi-flink-client/src/test/java/org/apache/hudi/io/storage/row/parquet/TestParquetSchemaConverter.java index 3d5012b73b37..9e07edbd4ca0 100644 --- a/hudi-client/hudi-flink-client/src/test/java/org/apache/hudi/io/storage/row/parquet/TestParquetSchemaConverter.java +++ b/hudi-client/hudi-flink-client/src/test/java/org/apache/hudi/io/storage/row/parquet/TestParquetSchemaConverter.java @@ -56,7 +56,7 @@ void testConvertComplexTypes() { + " }\n" + " optional group f_map (MAP) {\n" + " repeated group key_value {\n" - + " optional int32 key;\n" + + " required int32 key;\n" + " optional binary value (STRING);\n" + " }\n" + " }\n"