apache/iceberg · error · UnsupportedOperationException

Unsupported nested type: ${dataType}

Error message

Unsupported nested type: ${dataType}

What it means

ColumnVectorWithFilter.getChild lazily builds filtered child vectors for nested elements. It supports struct (recursing) and a two-child nested case (map/array); any other nested Spark DataType reaches the else branch and throws UnsupportedOperationException.

Source

Thrown at spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/data/vectorized/ColumnVectorWithFilter.java:154

  @Override
  public ColumnVector getChild(int ordinal) {
    if (children == null) {
      synchronized (this) {
        if (children == null) {
          if (dataType() instanceof StructType) {
            StructType structType = (StructType) dataType();
            this.children = new ColumnVectorWithFilter[structType.length()];
            for (int index = 0; index < structType.length(); index++) {
              children[index] = new ColumnVectorWithFilter(delegate.getChild(index), rowIdMapping);
            }
          } else if (dataType() instanceof VariantType) {
            this.children =
                new ColumnVectorWithFilter[] {
                  new ColumnVectorWithFilter(delegate.getChild(0), rowIdMapping),
                  new ColumnVectorWithFilter(delegate.getChild(1), rowIdMapping)
                };
          } else {
            throw new UnsupportedOperationException("Unsupported nested type: " + dataType());
          }
        }
      }
    }

    return children[ordinal];
  }
}

View on GitHub (pinned to 86d9c8fc54)

Solutions

  1. Upgrade iceberg-spark — nested-type coverage in ColumnVectorWithFilter has grown over releases.
  2. Disable vectorized reads (read.spark.vectorization.enabled=false) so a row-based reader handles the nested columns.
  3. Rewrite/compact the data files to remove conflicting delete files triggering the filtered path.

Example fix

// before
spark.conf.set("read.spark.vectorization.enabled", "true")
// after — workaround
spark.conf.set("read.spark.vectorization.enabled", "false")
Defensive patterns

Strategy: fallback

Try / catch

try {
  df = spark.read().format("iceberg").load(table);
} catch (UnsupportedOperationException e) {
  if (e.getMessage().contains("Unsupported nested type")) {
    spark.conf().set("read.spark.vectorization.enabled", "false"); // row-based fallback
    df = spark.read().format("iceberg").load(table);
  }
}

Prevention

When it happens

Trigger: Accessing a child of a filtered column vector whose Spark dataType() is a nested type other than the handled StructType/ArrayType/MapType layout — e.g. an unhandled nested variant during delete-filtered vectorized reads.

Common situations: Vectorized reads with row-level deletes over tables containing complex nested columns when using an Iceberg version whose ColumnVectorWithFilter lacks support for that nesting shape.

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/a3fa5b7fdd032a19. Report an issue: GitHub.