apache/beam · error · IllegalArgumentException

Unsupported type: <type>

Error message

Unsupported type: <type>

What it means

SerializableRow.getValue() serializes Delta kernel Row values into Java objects, handling primitive types plus ArrayType and MapType. Any other DataType falls through to an IllegalArgumentException 'Unsupported type: <type>'. This indicates a Delta DataType without a serialization mapping reached the converter.

Source

Thrown at sdks/java/io/delta/src/main/java/org/apache/beam/sdk/io/delta/SerializableRow.java:240

      return row.getString(index);
    } else if (type instanceof BinaryType) {
      return row.getBinary(index);
    } else if (type instanceof DecimalType) {
      return row.getDecimal(index);
    } else if (type instanceof StructType) {
      return new SerializableRow(row.getStruct(index));
    } else if (type instanceof DateType) {
      return row.getInt(index);
    } else if (type instanceof TimestampType) {
      return row.getLong(index);
    } else if (type instanceof ArrayType) {
      ArrayValue arr = row.getArray(index);
      return convertArray(arr, (ArrayType) type);
    } else if (type instanceof MapType) {
      MapValue map = row.getMap(index);
      return convertMap(map, (MapType) type);
    }
    throw new IllegalArgumentException("Unsupported type: " + type);
  }

  private static @Nullable Object getVectorValue(ColumnVector vector, int index, DataType type) {
    if (vector.isNullAt(index)) {
      return null;
    }
    if (type instanceof BooleanType) {
      return vector.getBoolean(index);
    } else if (type instanceof ByteType) {
      return vector.getByte(index);
    } else if (type instanceof ShortType) {
      return vector.getShort(index);
    } else if (type instanceof IntegerType) {
      return vector.getInt(index);
    } else if (type instanceof LongType) {
      return vector.getLong(index);
    } else if (type instanceof FloatType) {
      return vector.getFloat(index);

View on GitHub (pinned to 12126d8942)

Solutions

  1. Upgrade the Beam Delta IO connector and delta kernel to a version with mappings for the column's type
  2. Find the offending column via the table schema and cast it to a supported type in an upstream rewrite
  3. Avoid selecting the unsupported column if projection is available
  4. Confirm writer/reader protocol compatibility between the table and the connector's delta version

Example fix

// before
// table contains a column with unmapped Delta type
PCollection<Row> rows = input.apply(DeltaIO.read().withTable(path).withStartVersion(0L));
// after
-- rewrite table casting the column to a supported type (Spark/Scala example)
df = spark.read.format("delta").load(path).withColumn("weird_col", col("weird_col").cast("string"))
df.write.format("delta").mode("overwrite").save(path)
Defensive patterns

Strategy: validation

Validate before calling

// Verify every top-level column type is serializable by the connector before reading
for (StructField f : deltaSchema.fields()) {
  DataType t = f.getDataType();
  if (!(t instanceof ArrayType) && !(t instanceof MapType) && !isPrimitiveSupported(t)) {
    throw new IllegalStateException("Column " + f.getName() + " of type " + t + " is not serializable");
  }
}

Try / catch

try {
  rows = input.apply(deltaIO);
} catch (IllegalArgumentException e) {
  if (e.getMessage().startsWith("Unsupported type:")) {
    // cast/rewrite the offending column, or upgrade the connector
  } else { throw e; }
}

Prevention

When it happens

Trigger: A table column whose top-level Delta DataType (as serialized into the row) is neither a supported primitive nor Array/Map when SerializableRow wraps the row for the Beam source.

Common situations: Newer Delta protocol types (e.g. variant) read with an older connector; schema evolution introducing types the serializer predates; reading a table written by a different Delta runtime.

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/beam@12126d8942 (2026-09-13). Data as JSON: /api/errors/fb4eb0a0734d2f1e. Report an issue: GitHub.