{"record":{"id":"a3fa5b7fdd032a19","repo":"apache/iceberg","slug":"unsupported-nested-type-datatype-a3fa5b","errorCode":null,"errorMessage":"Unsupported nested type: ${dataType}","messagePattern":"Unsupported nested type: (.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"spark/v4.1/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.1/spark/src/main/java/org/apache/iceberg/spark/data/vectorized/ColumnVectorWithFilter.java#L136-L163","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Upgrade iceberg-spark — nested-type coverage in ColumnVectorWithFilter has grown over releases.","Disable vectorized reads (read.spark.vectorization.enabled=false) so a row-based reader handles the nested columns.","Rewrite/compact the data files to remove conflicting delete files triggering the filtered path."],"exampleFix":"// before\nspark.conf.set(\"read.spark.vectorization.enabled\", \"true\")\n// after — workaround\nspark.conf.set(\"read.spark.vectorization.enabled\", \"false\")","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(\"read.spark.vectorization.enabled\", \"false\"); // row-based fallback\n    df = spark.read().format(\"iceberg\").load(table);\n  }\n}","preventionTips":["Disable vectorization when reads hit equality/position deletes over deeply nested schemas on older Iceberg","Upgrade iceberg-spark for broader nested-type support in filtered vectors","Compact tables regularly to clear delete files"],"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"}