You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by da...@apache.org on 2023/05/17 02:07:18 UTC
[hudi] branch master updated: [HUDI-6222] ParquetSchemaConverter shoud always convert the Map key type as not nullable (#8728)
This is an automated email from the ASF dual-hosted git repository.
danny0405 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git
The following commit(s) were added to refs/heads/master by this push:
new 647ad0f4a0b [HUDI-6222] ParquetSchemaConverter shoud always convert the Map key type as not nullable (#8728)
647ad0f4a0b is described below
commit 647ad0f4a0be04922bebe0bc80faf68dd9625977
Author: Danny Chan <yu...@gmail.com>
AuthorDate: Wed May 17 10:07:11 2023 +0800
[HUDI-6222] ParquetSchemaConverter shoud always convert the Map key type as not nullable (#8728)
---
.../org/apache/hudi/io/storage/row/parquet/ParquetSchemaConverter.java | 2 +-
.../apache/hudi/io/storage/row/parquet/TestParquetSchemaConverter.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
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 7cd7c300670..8bd1a848855 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 @@ public class ParquetSchemaConverter {
.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 3d5012b73b3..9e07edbd4ca 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 @@ public class TestParquetSchemaConverter {
+ " }\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"