Skip to content

Commit 0e0b178

Browse files
committed
ice: Fix enum handling
Caused by: java.lang.ClassCastException: class java.nio.HeapByteBuffer cannot be cast to class java.lang.CharSequence at org.apache.iceberg.parquet.ParquetConversions.fromParquetPrimitive(ParquetConversions.java:58) at org.apache.iceberg.parquet.ParquetUtil.footerMetrics(ParquetUtil.java:145) at com.altinity.ice.cli.internal.cmd.Insert.processFile(Insert.java:501)
1 parent 4c6e3ad commit 0e0b178

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ice/src/main/java/org/apache/iceberg/parquet/ParquetConversions.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ static Function<Object, Object> converterFromParquet(
9090
static Function<Object, Object> converterFromParquet(PrimitiveType type) {
9191
if (type.getOriginalType() != null) {
9292
switch (type.getOriginalType()) {
93+
case ENUM:
9394
case UTF8:
9495
// decode to CharSequence to avoid copying into a new String
9596
return binary -> StandardCharsets.UTF_8.decode(((Binary) binary).toByteBuffer());

0 commit comments

Comments
 (0)