{"record":{"id":"07acb3f9abfbd346","repo":"apache/iceberg","slug":"unsupported-vector-vector-getclass","errorCode":null,"errorMessage":"Unsupported vector: \" + vector.getClass()","messagePattern":"Unsupported vector: \" \\+ vector\\.getClass\\(\\)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"arrow/src/main/java/org/apache/iceberg/arrow/vectorized/GenericArrowVectorAccessorFactory.java","lineNumber":234,"sourceCode":"    } else if (vector instanceof TimeStampNanoTZVector) {\n      return new TimestampAccessor<>((TimeStampNanoTZVector) vector);\n    } else if (vector instanceof ListVector) {\n      ListVector listVector = (ListVector) vector;\n      return new ArrayAccessor<>(listVector, arrayFactorySupplier.get());\n    } else if (vector instanceof StructVector) {\n      StructVector structVector = (StructVector) vector;\n      return new StructAccessor<>(structVector, structChildFactorySupplier.get());\n    } else if (vector instanceof TimeMicroVector) {\n      return new TimeMicroAccessor<>((TimeMicroVector) vector);\n    } else if (vector instanceof FixedSizeBinaryVector) {\n      if (isDecimal(primitive)) {\n        return new FixedSizeBinaryBackedDecimalAccessor<>(\n            (FixedSizeBinaryVector) vector, decimalFactorySupplier.get());\n      }\n      return new FixedSizeBinaryAccessor<>(\n          (FixedSizeBinaryVector) vector, stringFactorySupplier.get());\n    }\n    throw new UnsupportedOperationException(\"Unsupported vector: \" + vector.getClass());\n  }\n\n  private static boolean isDecimal(PrimitiveType primitive) {\n    return primitive != null\n        && primitive.getLogicalTypeAnnotation()\n            instanceof LogicalTypeAnnotation.DecimalLogicalTypeAnnotation;\n  }\n\n  private static class BooleanAccessor<\n          DecimalT, Utf8StringT, ArrayT, ChildVectorT extends AutoCloseable>\n      extends ArrowVectorAccessor<DecimalT, Utf8StringT, ArrayT, ChildVectorT> {\n    private final BitVector vector;\n\n    BooleanAccessor(BitVector vector) {\n      super(vector);\n      this.vector = vector;\n    }\n","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/arrow/src/main/java/org/apache/iceberg/arrow/vectorized/GenericArrowVectorAccessorFactory.java#L216-L252","documentation":"GenericArrowVectorAccessorFactory.getPlainVectorAccessor builds row accessors for Parquet-backed Arrow vectors. When the supplied vector is neither a VarCharVector, VarBinaryVector, nor FixedSizeBinaryVector (for non-decimal columns), it has no accessor mapping and the factory throws this UnsupportedOperationException. It signals that vectorized reads encountered a physical Parquet type the Arrow accessor layer cannot handle.","triggerScenarios":"Calling getVectorAccessor for a column whose Arrow vector class falls outside the handled set (e.g. an unexpected/wrapped vector type) while the primitive is not marked as decimal; the fixed-code path only produces FixedSizeBinaryBackedDecimalAccessor or FixedSizeBinaryAccessor before falling through to the throw.","commonSituations":"Reading Parquet files written by other engines with unusual encodings; a new Arrow/Parquet version mapping a type to a vector class this factory does not recognize; custom data files with a primitive column backed by a vector type outside the supported trio.","solutions":["Identify the vector class in the message and check whether the column should be decimal (LogicalTypeAnnotation.DecimalLogicalTypeAnnotation) — if so, fix the writer/type mapping so the decimal flag is set","Fall back to non-vectorized (generic) reads for that table/column by disabling vectorized reads in the scan config","Upgrade Iceberg (or Arrow) to a version that maps the vector type to an accessor","If the type is genuinely new, extend getPlainVectorAccessor with a branch for that vector class"],"exampleFix":"// before\nVectorizedReaderBuilder builder = ... // vectorized reads on exotic column\n// after\ncollection.task().shouldFailFast(); // or\ncollection.config().set(TableProperties.PARQUET_VECTORIZATION_ENABLED, \"false\");","handlingStrategy":"fallback","validationCode":"if (!vector.getClass().getSimpleName().matches(\"VarCharVector|VarBinaryVector|FixedSizeBinaryVector\")) {\n  // use non-vectorized read path\n}","typeGuard":"boolean isSupportedVector(FieldVector v) {\n  return v instanceof VarCharVector || v instanceof VarBinaryVector || v instanceof FixedSizeBinaryVector;\n}","tryCatchPattern":"try {\n  reader = VectorizedReaderBuilder.build();\n} catch (UnsupportedOperationException e) {\n  // fall back to generic Parquet read\n  reader = genericReader();\n}","preventionTips":["Disable vectorization for tables with nonstandard physical types","Keep Iceberg and Arrow versions aligned","Inspect Parquet metadata physical types before enabling vectorized reads"],"tags":["arrow","vectorized-reads","unsupported-type"],"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"}