{"record":{"id":"9b99c9de1bbab160","repo":"apache/iceberg","slug":"cannot-bind-unsupported-transform-s","errorCode":null,"errorMessage":"Cannot bind unsupported transform: %s","messagePattern":"Cannot bind unsupported transform: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"api/src/main/java/org/apache/iceberg/transforms/UnknownTransform.java","lineNumber":53,"sourceCode":"\n  /**\n   * Transforms a value to its corresponding partition value.\n   *\n   * @param value a source value\n   * @return ∅\n   * @throws UnsupportedOperationException Implementation is unknown\n   * @deprecated will be removed in 2.0.0; use {@link #bind(Type)} instead\n   */\n  @Deprecated\n  @Override\n  public T apply(S value) {\n    throw new UnsupportedOperationException(\n        String.format(\"Cannot apply unsupported transform: %s\", transform));\n  }\n\n  @Override\n  public SerializableFunction<S, T> bind(Type type) {\n    throw new UnsupportedOperationException(\n        String.format(\"Cannot bind unsupported transform: %s\", transform));\n  }\n\n  @Override\n  public boolean canTransform(Type type) {\n    // assume the transform function can be applied for any type\n    return true;\n  }\n\n  @Override\n  public Type getResultType(Type type) {\n    // the actual result type is not known\n    return Types.StringType.get();\n  }\n\n  @Override\n  public UnboundPredicate<T> project(String name, BoundPredicate<S> predicate) {\n    return null;","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/api/src/main/java/org/apache/iceberg/transforms/UnknownTransform.java#L35-L71","documentation":"UnknownTransform is a placeholder for a transform whose name the parser did not recognize (e.g. a transform added in a newer Iceberg spec version). Its bind() method always throws UnsupportedOperationException because an unknown transform cannot be compiled into a physical function for partition or sort expressions. The library throws this to fail fast rather than silently producing incorrect partitioning.","triggerScenarios":"Calling bind(Type) on a transform produced by Transforms.fromString/fromFunction with an unrecognized name, or building a PartitionSpec whose transform was parsed from metadata written by a newer Iceberg version.","commonSituations":"Reading table metadata written by a newer Iceberg release that defines a transform this client does not know; typo in transform name (e.g. 'truncat' instead of 'trunc'); custom transform functions not registered in Transforms.","solutions":["Upgrade the Iceberg client to a version that supports the transform in the table metadata","Check the transform name string against supported names in Transforms (identity, year, month, day, hour, bucket[N], trunc[W])","Replace the partition spec field with a supported transform and migrate the table if the newer transform is not required"],"exampleFix":"// before\nTransform t = Transforms.fromString(\"truncat\"); // unknown\n// after\nTransform t = Transforms.fromString(\"trunc[10]\"); // supported","handlingStrategy":"try-catch","validationCode":"Transform t = Transforms.fromString(name);\nif (t instanceof UnknownTransform) { throw new IllegalArgumentException(\"Unsupported transform: \" + name); }","typeGuard":"boolean isKnown(Transform t) { return !(t instanceof UnknownTransform); }","tryCatchPattern":"try { fn = transform.bind(type); } catch (UnsupportedOperationException e) { throw new IllegalArgumentException(\"Transform unsupported for this client: \" + e.getMessage()); }","preventionTips":["Validate transform names against Transforms before building partition specs","Keep Iceberg client versions in sync with table writers","Wrap bind() when reading foreign table metadata"],"tags":["java","transform","partitioning","unsupported-operation"],"backgroundTag":"unsupported-operation","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}