{"record":{"id":"ef3868533115bf8b","repo":"apache/iceberg","slug":"unsupported-nested-type","errorCode":null,"errorMessage":"Unsupported nested type: ","messagePattern":"Unsupported nested type: ","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"spark/v4.0/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.0/spark/src/main/java/org/apache/iceberg/spark/data/vectorized/ColumnVectorWithFilter.java#L136-L163","documentation":"ColumnVectorWithFilter wraps a delegate column vector and pre-builds filtered child vectors for nested types. Only arrays and structs (with up to two children in this branch) are supported; any other nested data type reaches the else branch and throws UnsupportedOperationException.","triggerScenarios":"Calling getChild(ordinal) on a ColumnVectorWithFilter whose delegate's data type is a nested type other than the supported array/struct shapes — e.g. a map column selected through a row-id filtered vectorized read.","commonSituations":"Reading tables with map-typed columns when deletion/filter vectors require child wrapping; also appears after Spark or Iceberg version changes introduce new nested types the wrapper does not handle.","solutions":["Avoid vectorized reads for the offending nested type (set read.arrow-vectorized.enabled=false or table property read.split.vectorization.enabled=false)","Restructure the schema so the unsupported nested type (e.g. map inside filtered read) is not selected in the batch read","Upgrade Iceberg — nested-type coverage in ColumnVectorWithFilter expands over releases","If confirmed missing support, file an Iceberg issue with the schema and read config"],"exampleFix":"// before\n.read().select(\"id\", \"my_map\") // map hits unsupported nested type\n// after\n.read().select(\"id\") // or disable vectorization for this read","handlingStrategy":"validation","validationCode":"if (dataType instanceof MapType) { disableVectorization(); } else { readWithVectors(); }","typeGuard":null,"tryCatchPattern":"try { child = filteredVector.getChild(ordinal); } catch (UnsupportedOperationException e) { // fall back to non-vectorized read }\nspark.conf.set(\"read.split.vectorization.enabled\", \"false\");","preventionTips":["Check schema for map/nested columns before enabling vectorized reads","Keep Iceberg and Spark versions aligned","Test vectorized reads against your full schema"],"tags":["spark","vectorized-read","nested-types"],"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"}