Skip to content

Commit

Permalink
Update Iceberg version to 1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ebyhr committed Jan 15, 2025
1 parent 1b1359c commit 5efe851
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 1 deletion.
14 changes: 14 additions & 0 deletions plugin/trino-iceberg/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -819,5 +819,19 @@
</plugins>
</build>
</profile>

<profile>
<id>use-iceberg-snapshot</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>iceberg-release-candidate</id>
<name>Iceberg Release Candidate</name>
<url>https://repository.apache.org/content/repositories/snapshots/org/apache/iceberg/</url>
</repository>
</repositories>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public static IcebergFileFormat fromIceberg(FileFormat format)
case AVRO -> AVRO;
// Not used as a data file format
case METADATA -> throw new IllegalArgumentException("Unexpected METADATA file format");
case PUFFIN -> throw new IllegalArgumentException("Unexpected PUFFIN file format");
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ public static Object getValue(JsonNode partitionValue, Type type)
createDecimalType(decimalType.precision(), decimalType.scale()));
// TODO https://github.com/trinodb/trino/issues/19753 Support Iceberg timestamp types with nanosecond precision
case TIMESTAMP_NANO:
// TODO https://github.com/trinodb/trino/issues/24538 Support variant type
case VARIANT:
case LIST:
case MAP:
case STRUCT:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ public static Type toTrinoType(org.apache.iceberg.types.Type type, TypeManager t
return RowType.from(fields.stream()
.map(field -> new RowType.Field(Optional.of(field.name()), toTrinoType(field.type(), typeManager)))
.collect(toImmutableList()));
case VARIANT:
// TODO https://github.com/trinodb/trino/issues/24538 Support variant type
break;
}
throw new UnsupportedOperationException(format("Cannot convert from Iceberg type '%s' (%s) to Trino type", type, type.typeId()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ private static String convertToTypeString(Type type)
case STRUCT -> "struct<%s>".formatted(type.asStructType().fields().stream()
.map(field -> "%s:%s".formatted(field.name(), convert(field.type())))
.collect(joining(",")));
// TODO https://github.com/trinodb/trino/issues/24538 Support variant type
case VARIANT -> throw new TrinoException(NOT_SUPPORTED, "Unsupported Iceberg type: VARIANT");
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ private static List<OrcType> toOrcType(int nextFieldTypeIndex, Type type, Map<St
.buildOrThrow();
yield ImmutableList.of(new OrcType(OrcTypeKind.BINARY, ImmutableList.of(), ImmutableList.of(), Optional.empty(), Optional.empty(), Optional.empty(), attributes));
}
// TODO https://github.com/trinodb/trino/issues/24538 Support variant type
case VARIANT -> throw new TrinoException(NOT_SUPPORTED, "Unsupported Iceberg type: VARIANT");
case STRUCT -> toOrcStructType(nextFieldTypeIndex, (StructType) type, attributes);
case LIST -> toOrcListType(nextFieldTypeIndex, (ListType) type, attributes);
case MAP -> toOrcMapType(nextFieldTypeIndex, (MapType) type, attributes);
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
<dep.gib.version>4.5.4</dep.gib.version>
<dep.google.http.client.version>1.45.3</dep.google.http.client.version>
<dep.httpcore5.version>5.3.2</dep.httpcore5.version>
<dep.iceberg.version>1.7.1</dep.iceberg.version>
<dep.iceberg.version>1.8.0-SNAPSHOT</dep.iceberg.version>
<dep.jna.version>5.16.0</dep.jna.version>
<dep.joda.version>2.12.7</dep.joda.version>
<dep.jsonwebtoken.version>0.12.6</dep.jsonwebtoken.version>
Expand Down

0 comments on commit 5efe851

Please sign in to comment.