{"record":{"id":"70cce9781bf5f12d","repo":"apache/iceberg","slug":"unknown-dummy-vector-holder","errorCode":null,"errorMessage":"Unknown dummy vector holder: ","messagePattern":"Unknown dummy vector holder: ","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/data/vectorized/ColumnVectorBuilder.java","lineNumber":41,"sourceCode":"import org.apache.iceberg.types.Type;\nimport org.apache.iceberg.types.Types;\nimport org.apache.spark.sql.vectorized.ColumnVector;\n\nclass ColumnVectorBuilder {\n\n  public ColumnVector build(VectorHolder holder, int numRows) {\n    if (holder instanceof VectorHolder.VariantVectorHolder) {\n      return new VariantColumnVector((VectorHolder.VariantVectorHolder) holder);\n    } else if (holder.isDummy()) {\n      if (holder instanceof VectorHolder.DeletedVectorHolder) {\n        return new DeletedColumnVector(Types.BooleanType.get());\n      } else if (holder instanceof ConstantVectorHolder) {\n        ConstantVectorHolder<?> constantHolder = (ConstantVectorHolder<?>) holder;\n        Type icebergType = constantHolder.icebergType();\n        Object value = constantHolder.getConstant();\n        return new ConstantColumnVector(icebergType, numRows, value);\n      } else {\n        throw new IllegalStateException(\"Unknown dummy vector holder: \" + holder);\n      }\n    } else {\n      return new IcebergArrowColumnVector(holder);\n    }\n  }\n}\n","sourceCodeStart":23,"sourceCodeEnd":48,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/data/vectorized/ColumnVectorBuilder.java#L23-L48","documentation":"ColumnVectorBuilder.build() converts 'dummy' vector holders used during vectorized reads into real column vectors. If a holder is neither a constant holder nor one of the recognized dummy holder types, the builder cannot interpret it and throws IllegalStateException, indicating an internal invariant violation rather than user error.","triggerScenarios":"A vectorized batch read (readDataToColumnVectors) encounters a VectorHolder that is not an instance of the supported dummy holder types (e.g. ConstantVectorHolder) and not a plain vector holder either — typically after a custom or newly added holder implementation is passed into the builder.","commonSituations":"Appears when Iceberg's vectorized read path introduces a new holder type without updating the builder, when a Spark/Paimon-style wrapper holder leaks into Iceberg's reader, or when internal refactors pair mismatched reader/builder versions (mixed jar versions of iceberg-spark on the classpath).","solutions":["Check for mixed Iceberg jar versions on the classpath and align all iceberg-spark/iceberg-core artifacts to one version","Upgrade Iceberg — new dummy holder types are supported in newer releases","If you implement a custom VectorHolder, wrap your constant data in ConstantVectorHolder instead of a custom holder","File/inspect an Iceberg issue: this path should never be hit with stock readers"],"exampleFix":"// before\nVectorHolder holder = myCustomHolder; // unknown dummy holder\n// after\nVectorHolder holder = new ConstantVectorHolder<>(numRows, icebergType, constantValue);","handlingStrategy":"try-catch","validationCode":"if (!(holder instanceof ConstantVectorHolder) && !(isKnownDummyHolder(holder))) { throw new IllegalArgumentException(\"unsupported holder: \" + holder.getClass()); }","typeGuard":"boolean isKnownHolder(VectorHolder h) { return h instanceof ConstantVectorHolder<?> || h.getClass().getName().startsWith(\"org.apache.iceberg.spark.data.vectorized\"); }","tryCatchPattern":"try { vector = builder.build(holder, numRows); } catch (IllegalStateException e) { log.error(\"unknown holder {}\", holder.getClass(), e); throw new IOException(\"unsupported vector holder\", e); }","preventionTips":["Pin all Iceberg modules to one version","Use ConstantVectorHolder for constant data","Add a unit test for any custom VectorHolder implementation"],"tags":["spark","vectorized-read","internal-state"],"backgroundTag":"internal-invariant-violation","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"}