{"record":{"id":"c34493eadc67f532","repo":"apache/iceberg","slug":"unsupported-symboltype-c34493","errorCode":null,"errorMessage":"Unsupported SymbolType.","messagePattern":"Unsupported SymbolType\\.","errorType":"exception","errorClass":"java.lang.UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/FlinkTypeVisitor.java","lineNumber":73,"sourceCode":"\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":55,"sourceCodeEnd":81,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/FlinkTypeVisitor.java#L55-L81","documentation":"FlinkTypeVisitor throws UnsupportedOperationException for SymbolType, Flink's type for internal symbol tokens (used by some internal functions/state). There is no Iceberg equivalent, so conversion is rejected.","triggerScenarios":"Schema conversion encountering a column of type SymbolType (e.g. from internal function results or certain connectors), dispatching to visit(SymbolType).","commonSituations":"Persisting results of internal Flink functions (like certain windowing/state markers) into Iceberg tables; exotic connector columns surfaced as symbols.","solutions":["Replace the symbol column with an equivalent STRING or INT representation before writing.","Cast the symbol to STRING in the query feeding the Iceberg table.","Exclude symbol columns from the Iceberg table schema.","Subclass FlinkTypeVisitor and override visit(SymbolType) with a custom mapping."],"exampleFix":"// before\ncol 'sym' SYMBOL(*)\n\n// after\ncol 'sym' STRING  -- cast the symbol to string upstream","handlingStrategy":"validation","validationCode":"for (Column col : resolvedSchema.getColumns()) {\n  if (col.getDataType().getLogicalType() instanceof SymbolType) {\n    throw new IllegalArgumentException(\"Column '\" + col.getName() + \"' is a SYMBOL; cast to STRING/INT before persisting\");\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  Schema s = FlinkSchemaUtil.toIcebergSchema(flinkSchema);\n} catch (UnsupportedOperationException e) {\n  if (e.getMessage().contains(\"SymbolType\")) {\n    // cast symbol columns to STRING upstream\n  } else {\n    throw e;\n  }\n}","preventionTips":["Cast symbol-typed results to STRING/INT before writing to Iceberg tables.","Avoid persisting internal symbol columns.","Pre-validate schemas before conversion."],"tags":["flink","type-mapping","symbol-type","unsupported"],"backgroundTag":"unsupported-operation","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"}