apache/iceberg · error · java.lang.UnsupportedOperationException

Unsupported SymbolType.

Error message

Unsupported SymbolType.

What it means

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.

Solutions

  1. Replace the symbol column with an equivalent STRING or INT representation before writing.
  2. Cast the symbol to STRING in the query feeding the Iceberg table.
  3. Exclude symbol columns from the Iceberg table schema.
  4. Subclass FlinkTypeVisitor and override visit(SymbolType) with a custom mapping.

Example fix

// before
col 'sym' SYMBOL(*)

// after
col 'sym' STRING  -- cast the symbol to string upstream
Defensive patterns

Strategy: validation

Validate before calling

for (Column col : resolvedSchema.getColumns()) {
  if (col.getDataType().getLogicalType() instanceof SymbolType) {
    throw new IllegalArgumentException("Column '" + col.getName() + "' is a SYMBOL; cast to STRING/INT before persisting");
  }
}

Try / catch

try {
  Schema s = FlinkSchemaUtil.toIcebergSchema(flinkSchema);
} catch (UnsupportedOperationException e) {
  if (e.getMessage().contains("SymbolType")) {
    // cast symbol columns to STRING upstream
  } else {
    throw e;
  }
}

Prevention

When it happens

Trigger: Schema conversion encountering a column of type SymbolType (e.g. from internal function results or certain connectors), dispatching to visit(SymbolType).

Common situations: Persisting results of internal Flink functions (like certain windowing/state markers) into Iceberg tables; exotic connector columns surfaced as symbols.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12). Data as JSON: /api/errors/c34493eadc67f532. Report an issue: GitHub.

Appendix: source

Thrown at flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/FlinkTypeVisitor.java:73

  @Override
  public T visit(StructuredType structuredType) {
    throw new UnsupportedOperationException("Unsupported StructuredType.");
  }

  @Override
  public T visit(NullType nullType) {
    throw new UnsupportedOperationException("Unsupported NullType.");
  }

  @Override
  public T visit(RawType<?> rawType) {
    throw new UnsupportedOperationException("Unsupported RawType.");
  }

  @Override
  public T visit(SymbolType<?> symbolType) {
    throw new UnsupportedOperationException("Unsupported SymbolType.");
  }

  @Override
  public T visit(LogicalType other) {
    throw new UnsupportedOperationException("Unsupported type: " + other);
  }
}

View on GitHub (pinned to 86d9c8fc54)