{"record":{"id":"07f6456803077874","repo":"apache/iceberg","slug":"not-supported-yet-07f645","errorCode":null,"errorMessage":"Not supported yet.","messagePattern":"Not supported yet\\.","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/data/StructRowData.java","lineNumber":215,"sourceCode":"        LocalDateTime ldt = (LocalDateTime) timeVal;\n        return TimestampData.fromEpochMillis(\n            ldt.toInstant(ZoneOffset.UTC).toEpochMilli(), ldt.getNano() % 1_000_000);\n      } else if (timeVal instanceof Long) {\n        long timeLong = (Long) timeVal;\n        return TimestampData.fromEpochMillis(\n            Math.floorDiv(timeLong, 1_000_000L), (int) Math.floorMod(timeLong, 1_000_000L));\n      } else {\n        throw new IllegalStateException(\"Unknown type for timestamp_ns: \" + timeVal.getClass());\n      }\n    }\n    long timeLong = getLong(pos);\n    return TimestampData.fromEpochMillis(\n        Math.floorDiv(timeLong, 1000L), (int) Math.floorMod(timeLong, 1000L) * 1000);\n  }\n\n  @Override\n  public <T> RawValueData<T> getRawValue(int pos) {\n    throw new UnsupportedOperationException(\"Not supported yet.\");\n  }\n\n  @Override\n  public byte[] getBinary(int pos) {\n    return isNullAt(pos) ? null : getBinaryInternal(pos);\n  }\n\n  private byte[] getBinaryInternal(int pos) {\n    Object bytes = struct.get(pos, Object.class);\n\n    // should only be either ByteBuffer or byte[]\n    if (bytes instanceof ByteBuffer) {\n      return ByteBuffers.toByteArray((ByteBuffer) bytes);\n    } else if (bytes instanceof byte[]) {\n      return (byte[]) bytes;\n    } else if (bytes instanceof UUID) {\n      UUID uuid = (UUID) bytes;\n      ByteBuffer bb = ByteBuffer.allocate(16);","sourceCodeStart":197,"sourceCodeEnd":233,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/data/StructRowData.java#L197-L233","documentation":"StructRowData.getRawValue implements the RowData API's RawValueData accessor, but this Iceberg-to-Flink adapter never supports raw (pass-through, non-deserialized) value access — it unconditionally throws UnsupportedOperationException('Not supported yet.'). Raw values are a Flink optimization that lets operators consume internal objects directly; Iceberg's StructLike-backed rows can't provide them.","triggerScenarios":"Any code path calling getRawValue(pos) on a StructRowData — e.g. a Flink operator or function configured to use RawValueData / raw value passthrough on rows produced by an Iceberg scan.","commonSituations":"Custom Flink SourceFunction/ProcessFunction optimization that reads raw values; Flink connectors or state backends probing RowData for RawValueData support; generic RowData utility code exercising all accessors.","solutions":["Rewrite the consuming code to use the typed accessors (getInt/getLong/getString/getRow/...) instead of getRawValue.","Configure the Flink operator/connector to not use raw value passthrough for Iceberg-sourced rows.","Copy the field into a wrapper type and build RawValueData yourself if passthrough is essential: RawValueData.fromXxx(...).","If you own the adapter, consider returning RawValueData of the boxed StructLike value, though typed access is the supported path."],"exampleFix":"// before\nMyType v = rowData.getRawValue(pos).toObject(MyType.class); // throws\n\n// after\nRowData inner = structRowData;\nMyType v = (MyType) inner.getRow(pos, numFields); // typed access instead of raw value","handlingStrategy":"type-guard","validationCode":"if (row instanceof StructRowData) {\n  throw new IllegalStateException(\"Raw values not supported on Iceberg rows; use typed accessors\");\n}","typeGuard":"boolean supportsRawValues(RowData row) {\n  return !(row instanceof StructRowData);\n}","tryCatchPattern":"try {\n  RawValueData<?> rv = row.getRawValue(pos);\n} catch (UnsupportedOperationException e) {\n  if (\"Not supported yet.\".equals(e.getMessage())) {\n    // fall back to typed accessor for this field\n    Object typed = readTypedValue(row, pos, fieldType);\n  } else {\n    throw e;\n  }\n}","preventionTips":["Never call getRawValue on rows produced by Iceberg scans; use typed accessors.","Disable raw-value passthrough optimizations in operators consuming Iceberg RowData."],"tags":["flink","rowdata","raw-value","not-implemented"],"backgroundTag":"method-not-implemented","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"}