{"record":{"id":"1ad24f37737a3939","repo":"apache/iceberg","slug":"unsupported-nested-type-datatype-1ad24f","errorCode":null,"errorMessage":"Unsupported nested type: ${dataType()}","messagePattern":"Unsupported nested type: (.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"spark/v4.2/spark/src/main/java/org/apache/iceberg/spark/data/vectorized/ColumnVectorWithFilter.java","lineNumber":154,"sourceCode":"  @Override\n  public ColumnVector getChild(int ordinal) {\n    if (children == null) {\n      synchronized (this) {\n        if (children == null) {\n          if (dataType() instanceof StructType) {\n            StructType structType = (StructType) dataType();\n            this.children = new ColumnVectorWithFilter[structType.length()];\n            for (int index = 0; index < structType.length(); index++) {\n              children[index] = new ColumnVectorWithFilter(delegate.getChild(index), rowIdMapping);\n            }\n          } else if (dataType() instanceof VariantType) {\n            this.children =\n                new ColumnVectorWithFilter[] {\n                  new ColumnVectorWithFilter(delegate.getChild(0), rowIdMapping),\n                  new ColumnVectorWithFilter(delegate.getChild(1), rowIdMapping)\n                };\n          } else {\n            throw new UnsupportedOperationException(\"Unsupported nested type: \" + dataType());\n          }\n        }\n      }\n    }\n\n    return children[ordinal];\n  }\n}\n","sourceCodeStart":136,"sourceCodeEnd":163,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/spark/v4.2/spark/src/main/java/org/apache/iceberg/spark/data/vectorized/ColumnVectorWithFilter.java#L136-L163","documentation":"ColumnVectorWithFilter wraps a delegate ColumnVector and applies a row-id mapping when filtering deleted rows. When lazily constructing child vectors for nested types it supports only two-child structures (e.g. structs with two fields); any other nested data type is rejected with UnsupportedOperationException because filtered child vectors cannot be built for it.","triggerScenarios":"Reading a column with delete-filtered row mapping whose nested type has children beyond the two supported ones — e.g. a struct with more than 2 fields, or a map/list nested type reached via getChild(ordinal).","commonSituations":"Row-level delete files applied to tables with wide nested structs; queries selecting deeply nested columns (maps, lists, large structs) while positional/equality deletes are in scope; schema evolution adding a third field to a previously two-field struct read with deletes.","solutions":["Avoid selecting the unsupported nested column in the same query as row-level deletes, or rewrite the deletes as partition-level/whole-file deletes.","Extend ColumnVectorWithFilter.getChild() to handle the missing nested type (e.g. add a branch for more children or map/list types) if you control the build.","Disable vectorized reads (spark.sql.iceberg.handle-timestamp-without-timezone / vectorization settings, or set read.vectorization.enabled=false) to fall back to the non-vectorized path.","Upgrade Iceberg — newer versions broaden nested-type support in the delete-filtered vectorized reader."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  df = spark.read.format(\"iceberg\").load(\"table\")\n} catch (UnsupportedOperationException e) {\n  if (e.getMessage().contains(\"Unsupported nested type\")) {\n    spark.conf.set(\"spark.sql.iceberg.vectorization.enabled\", \"false\");\n    df = spark.read.format(\"iceberg\").load(\"table\");\n  } else throw e;\n}","preventionTips":["Test delete-filtered reads against all nested column types your tables use.","Avoid mixing row-level deletes with wide structs/large nested types in vectorized scans.","Pin the iceberg-spark-runtime version to your Spark version."],"tags":["spark","vectorized-read","nested-types","deletes"],"backgroundTag":"unsupported-operation","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}