Skip to content
Merged
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
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<dep.testng.version>6.10</dep.testng.version>
<dep.assertj-core.version>3.8.0</dep.assertj-core.version>
<dep.logback.version>1.2.3</dep.logback.version>
<dep.parquet.version>1.11.0</dep.parquet.version>
<dep.parquet.version>1.11.1</dep.parquet.version>
<dep.nexus-staging-plugin.version>1.6.8</dep.nexus-staging-plugin.version>
<dep.asm.version>9.0</dep.asm.version>
<dep.gcs.version>1.9.17</dep.gcs.version>
Expand Down Expand Up @@ -623,7 +623,7 @@
<dependency>
<groupId>com.facebook.presto.hive</groupId>
<artifactId>hive-apache</artifactId>
<version>3.0.0-3</version>
<version>3.0.0-7</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,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 @@ -877,8 +877,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
4 changes: 4 additions & 0 deletions presto-iceberg/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@
<groupId>org.apache.parquet</groupId>
<artifactId>parquet-format</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.yetus</groupId>
<artifactId>audience-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
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();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ugurmeet this change broke the iceberg test, I tried to change it back, then iceberg test looks ok. But looks like it would failed hive test, am I right?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I think the root cause is the parquet version in the root pom of presto is still 1.11.0, and iceberg connector is using parquet version in the root pom somehow. @ugurmeet could you upgrade the parquet in the root pom of presto to 1.11.1? then the issue should be fixed. Thanks!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @beinan , all tests are passing now

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much! You work unblocks a dozen of new features on hive and iceberg connector!

Type keyType = type.getKeyType();
Type valueType = type.getValueType();
return Types.map(OPTIONAL)
Expand Down