apache/iceberg · error · UnsupportedOperationException

Type not supported yet

Error message

Type not supported yet: <valueClassName>

What it means

getParquetPrimitive converts an Iceberg literal's Java value into the Parquet-expected type (comparable primitives, Binary for strings, etc.). Values of types outside the handled set (Integer, Long, Float, Double, Boolean, CharSequence, ByteBuffer) trigger this UnsupportedOperationException. It signals the literal's runtime type is not convertible to a Parquet filter value.

Solutions

  1. Filter on columns with supported types (int, long, float, double, boolean, string, binary) for pushdown
  2. Convert the literal value to a supported type (e.g. ByteBuffer for binary) before binding
  3. Handle such predicates outside pushdown and evaluate them at scan time

Example fix

// before
Expression e = Expressions.equal("id", UUID.randomUUID()); // UUID literal not supported
// after
Expression e = Expressions.equal("id_bin", ByteBuffer.wrap(uuidBytes));
Defensive patterns

Strategy: validation

Validate before calling

Object v = literal.value();
if (!(v instanceof Integer || v instanceof Long || v instanceof Float || v instanceof Double
    || v instanceof Boolean || v instanceof CharSequence || v instanceof ByteBuffer)) {
  throw new IllegalArgumentException("Literal type not Parquet-filter compatible: " + v.getClass());
}

Type guard

static boolean isParquetFilterType(Object v) {
  return v instanceof Integer || v instanceof Long || v instanceof Float || v instanceof Double
      || v instanceof Boolean || v instanceof CharSequence || v instanceof ByteBuffer;
}

Try / catch

try {
  FilterPredicate p = ParquetFilters.predicate(bound);
} catch (UnsupportedOperationException e) {
  // evaluate predicate post-scan instead of pushdown
}

Prevention

When it happens

Trigger: Calling ParquetFilters.predicate() with a comparison whose literal value is none of the supported types — e.g. a BigDecimal, UUID, byte[], or a custom typed literal from Iceberg expressions.

Common situations: Filtering decimal or fixed columns with pushed-down predicates; filtering on UUID columns; passing literals whose object() returns exotic wrapper types after binding.

Related errors


AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12). Data as JSON: /api/errors/a9d13877b508abc4. Report an issue: GitHub.

Appendix: source

Thrown at parquet/src/main/java/org/apache/iceberg/parquet/ParquetFilters.java:233

    }
  }

  @SuppressWarnings("unchecked")
  private static <C extends Comparable<C>> C getParquetPrimitive(Literal<?> lit) {
    if (lit == null) {
      return null;
    }

    // TODO: this needs to convert to handle BigDecimal and UUID
    Object value = lit.value();
    if (value instanceof Number) {
      return (C) lit.value();
    } else if (value instanceof CharSequence) {
      return (C) Binary.fromString(value.toString());
    } else if (value instanceof ByteBuffer) {
      return (C) Binary.fromReusedByteBuffer((ByteBuffer) value);
    }
    throw new UnsupportedOperationException(
        "Type not supported yet: " + value.getClass().getName());
  }

  private static class AlwaysTrue implements FilterPredicate {
    static final AlwaysTrue INSTANCE = new AlwaysTrue();

    @Override
    public <R> R accept(Visitor<R> visitor) {
      throw new UnsupportedOperationException("AlwaysTrue is a placeholder only");
    }
  }

  private static class AlwaysFalse implements FilterPredicate {
    static final AlwaysFalse INSTANCE = new AlwaysFalse();

    @Override
    public <R> R accept(Visitor<R> visitor) {
      throw new UnsupportedOperationException("AlwaysFalse is a placeholder only");

View on GitHub (pinned to 86d9c8fc54)