{"record":{"id":"cc31acfe50e589e4","repo":"apache/iceberg","slug":"unsupported-rawtype-cc31ac","errorCode":null,"errorMessage":"Unsupported RawType.","messagePattern":"Unsupported RawType\\.","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/FlinkTypeVisitor.java","lineNumber":68,"sourceCode":"\n  @Override\n  public T visit(DistinctType distinctType) {\n    throw new UnsupportedOperationException(\"Unsupported DistinctType.\");\n  }\n\n  @Override\n  public T visit(StructuredType structuredType) {\n    throw new UnsupportedOperationException(\"Unsupported StructuredType.\");\n  }\n\n  @Override\n  public T visit(NullType nullType) {\n    throw new UnsupportedOperationException(\"Unsupported NullType.\");\n  }\n\n  @Override\n  public T visit(RawType<?> rawType) {\n    throw new UnsupportedOperationException(\"Unsupported RawType.\");\n  }\n\n  @Override\n  public T visit(SymbolType<?> symbolType) {\n    throw new UnsupportedOperationException(\"Unsupported SymbolType.\");\n  }\n\n  @Override\n  public T visit(LogicalType other) {\n    throw new UnsupportedOperationException(\"Unsupported type: \" + other);\n  }\n}\n","sourceCodeStart":50,"sourceCodeEnd":81,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/FlinkTypeVisitor.java#L50-L81","documentation":"FlinkTypeVisitor.visit(RawType) throws UnsupportedOperationException because Iceberg cannot store Flink RAW types (opaque serialized user objects). Conversion fails rather than serializing values opaquely into the Iceberg schema.","triggerScenarios":"Schema conversion over a column typed RAW('class','serializer') — usually produced by UDFs returning user objects or TypeInformation-based RAW columns.","commonSituations":"UDF outputs or connector columns using custom Java objects without mapping to SQL types, then landing in Iceberg sink table definitions.","solutions":["Convert the RAW column to a concrete SQL type (STRING, BINARY, ROW<...>) before writing to Iceberg.","Have the UDF return a supported type or declare an explicit result DataType.","Serialize the object to JSON/Avro bytes into a STRING/BINARY column."],"exampleFix":"// before\ncolumn RAW<'com.acme.Payload', 'com.acme.PayloadSerde'> payload;\n// after\ncolumn STRING payload; // JSON-serialized payload","handlingStrategy":"type-guard","validationCode":"if (dataType.getLogicalType() instanceof RawType) {\n  throw new IllegalArgumentException(\"Convert RAW columns to SQL types (STRING/BINARY/ROW) before Iceberg write\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Have UDFs return SQL-native types instead of RAW Java objects.","Serialize custom objects to JSON/bytes before storing in Iceberg columns."],"tags":["flink","type-mapping","raw-type"],"backgroundTag":"incompatible-source-type","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"}