{"record":{"id":"a9d13877b508abc4","repo":"apache/iceberg","slug":"type-not-supported-yet-valueclassname","errorCode":null,"errorMessage":"Type not supported yet: <valueClassName>","messagePattern":"Type not supported yet: <valueClassName>","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"parquet/src/main/java/org/apache/iceberg/parquet/ParquetFilters.java","lineNumber":233,"sourceCode":"    }\n  }\n\n  @SuppressWarnings(\"unchecked\")\n  private static <C extends Comparable<C>> C getParquetPrimitive(Literal<?> lit) {\n    if (lit == null) {\n      return null;\n    }\n\n    // TODO: this needs to convert to handle BigDecimal and UUID\n    Object value = lit.value();\n    if (value instanceof Number) {\n      return (C) lit.value();\n    } else if (value instanceof CharSequence) {\n      return (C) Binary.fromString(value.toString());\n    } else if (value instanceof ByteBuffer) {\n      return (C) Binary.fromReusedByteBuffer((ByteBuffer) value);\n    }\n    throw new UnsupportedOperationException(\n        \"Type not supported yet: \" + value.getClass().getName());\n  }\n\n  private static class AlwaysTrue implements FilterPredicate {\n    static final AlwaysTrue INSTANCE = new AlwaysTrue();\n\n    @Override\n    public <R> R accept(Visitor<R> visitor) {\n      throw new UnsupportedOperationException(\"AlwaysTrue is a placeholder only\");\n    }\n  }\n\n  private static class AlwaysFalse implements FilterPredicate {\n    static final AlwaysFalse INSTANCE = new AlwaysFalse();\n\n    @Override\n    public <R> R accept(Visitor<R> visitor) {\n      throw new UnsupportedOperationException(\"AlwaysFalse is a placeholder only\");","sourceCodeStart":215,"sourceCodeEnd":251,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/parquet/src/main/java/org/apache/iceberg/parquet/ParquetFilters.java#L215-L251","documentation":"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.","triggerScenarios":"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.","commonSituations":"Filtering decimal or fixed columns with pushed-down predicates; filtering on UUID columns; passing literals whose object() returns exotic wrapper types after binding.","solutions":["Filter on columns with supported types (int, long, float, double, boolean, string, binary) for pushdown","Convert the literal value to a supported type (e.g. ByteBuffer for binary) before binding","Handle such predicates outside pushdown and evaluate them at scan time"],"exampleFix":"// before\nExpression e = Expressions.equal(\"id\", UUID.randomUUID()); // UUID literal not supported\n// after\nExpression e = Expressions.equal(\"id_bin\", ByteBuffer.wrap(uuidBytes));","handlingStrategy":"validation","validationCode":"Object v = literal.value();\nif (!(v instanceof Integer || v instanceof Long || v instanceof Float || v instanceof Double\n    || v instanceof Boolean || v instanceof CharSequence || v instanceof ByteBuffer)) {\n  throw new IllegalArgumentException(\"Literal type not Parquet-filter compatible: \" + v.getClass());\n}","typeGuard":"static boolean isParquetFilterType(Object v) {\n  return v instanceof Integer || v instanceof Long || v instanceof Float || v instanceof Double\n      || v instanceof Boolean || v instanceof CharSequence || v instanceof ByteBuffer;\n}","tryCatchPattern":"try {\n  FilterPredicate p = ParquetFilters.predicate(bound);\n} catch (UnsupportedOperationException e) {\n  // evaluate predicate post-scan instead of pushdown\n}","preventionTips":["Filter on primitive/string/binary columns for pushdown","Convert decimals/UUIDs to supported representations or filter client-side"],"tags":["parquet","predicate-pushdown","type-mismatch"],"backgroundTag":"unsupported-dtype","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}