Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@
<dependency>
<groupId>com.facebook.presto.hive</groupId>
<artifactId>hive-apache</artifactId>
<version>3.0.0-3</version>
<version>3.0.0-7-SNAPSHOT</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ public void testSchemaMismatch()
.isFailingForPageSource(new ParquetPageSourceFactory(FUNCTION_AND_TYPE_MANAGER, FUNCTION_RESOLUTION, HDFS_ENVIRONMENT, STATS, METADATA_READER), expectedErrorCode, expectedMessageMapLongLong);

String expectedMessageMapLongMapDouble = "The column column_name of table schema.table is declared as type map<bigint,bigint>, but the Parquet file ((.*?)) declares the column as type optional group column_name \\(MAP\\) \\{\n"
+ " repeated group map \\(MAP_KEY_VALUE\\) \\{\n"
+ " repeated group key_value \\(MAP_KEY_VALUE\\) \\{\n"
+ " required double key;\n"
+ " optional double value;\n"
+ " \\}\n"
Expand Down Expand Up @@ -867,8 +867,8 @@ public void testSchemaMismatchOnNestedStruct()

HiveErrorCode expectedErrorCode = HIVE_PARTITION_SCHEMA_MISMATCH;
String expectedMessageRowLongNest = "The column column_name of table schema.table is declared as type map<string,struct<s_double:int,s_int:int>>, but the Parquet file ((.*?)) declares the column as type optional group column_name \\(MAP\\) \\{\n" +
" repeated group map \\(MAP_KEY_VALUE\\) \\{\n" +
" required binary key \\(UTF8\\);\n" +
" repeated group key_value \\(MAP_KEY_VALUE\\) \\{\n" +
" required binary key \\(STRING\\);\n" +
" optional group value \\{\n" +
" optional int32 s_int;\n" +
" optional double s_double;\n" +
Expand Down
1 change: 1 addition & 0 deletions presto-iceberg/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@
<ignoredClassPattern>module-info</ignoredClassPattern>
<ignoredClassPattern>org.apache.avro.*</ignoredClassPattern>
<ignoredClassPattern>org.apache.parquet.*</ignoredClassPattern>
<ignoredClassPattern>org.apache.yetus.audience.*</ignoredClassPattern>
</ignoredClassPatterns>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ private org.apache.parquet.schema.Type getArrayType(ArrayType type, String name,

private org.apache.parquet.schema.Type getMapType(MapType type, String name, List<String> parent)
{
parent = ImmutableList.<String>builder().addAll(parent).add(name).add("map").build();
parent = ImmutableList.<String>builder().addAll(parent).add(name).add("key_value").build();
Type keyType = type.getKeyType();
Type valueType = type.getValueType();
return Types.map(OPTIONAL)
Expand Down