{"record":{"id":"bb215c571cb307ce","repo":"apache/beam","slug":"unsupported-vector-type-type-getclass","errorCode":null,"errorMessage":"Unsupported vector type: <type.getClass()>","messagePattern":"Unsupported vector type: <type\\.getClass\\(\\)>","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"sdks/java/io/delta/src/main/java/org/apache/beam/sdk/io/delta/DeltaSourceDoFn.java","lineNumber":376,"sourceCode":"      for (int i = 0; i < size; i++) {\n        Object key = getVectorValue(keys, i, keyType);\n        if (key != null) {\n          map.put(key, getVectorValue(values, i, valueType));\n        }\n      }\n      return map;\n    } else if (type instanceof StructType) {\n      StructType structType = (StructType) type;\n      int numFields = structType.fields().size();\n      ColumnVector[] childVectors = new ColumnVector[numFields];\n      for (int i = 0; i < numFields; i++) {\n        childVectors[i] = vector.getChild(i);\n      }\n      io.delta.kernel.data.Row nestedRow = new VectorRow(structType, childVectors, index);\n      Schema nestedBeamSchema = DeltaIO.ReadRows.convertToBeamSchema(structType);\n      return toBeamRow(nestedRow, nestedBeamSchema);\n    }\n    throw new UnsupportedOperationException(\"Unsupported vector type: \" + type.getClass());\n  }\n\n  // A new new Delta Row type to efficiently convert columnar data from Delta Lake\n  // to Beam Rows. We use this to store columnar vectors without creating\n  // additinal memory copies for all fields but return values of the specific\n  // row index.\n  private static class VectorRow implements io.delta.kernel.data.Row {\n    private final StructType schema;\n    private final ColumnVector[] fields;\n    private final int rowIndex;\n\n    VectorRow(StructType schema, ColumnVector[] fields, int rowIndex) {\n      this.schema = schema;\n      this.fields = fields;\n      this.rowIndex = rowIndex;\n    }\n\n    @Override","sourceCodeStart":358,"sourceCodeEnd":394,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/delta/src/main/java/org/apache/beam/sdk/io/delta/DeltaSourceDoFn.java#L358-L394","documentation":"getVectorValue() converts columnar ColumnVector data into Beam values for known DataType variants; for any unrecognized DataType it throws UnsupportedOperationException with the vector's type class. This is the columnar-path equivalent of getFieldValue()'s unsupported-type error.","triggerScenarios":"During processElement, a Parquet column vector whose Delta DataType is not among the supported primitives/complex types is converted while materializing Beam Rows.","commonSituations":"Tables using newer Delta types the connector doesn't map; Parquet-encoded columns with types outside the supported set; version skew between delta kernel, parquet-mr, and the Beam connector.","solutions":["Upgrade Beam Delta IO connector and io.delta kernel dependencies to support the column's type","Identify the offending column from the schema and its DataType","Rewrite/ETL the table casting that column into a supported type","Restrict the read to supported columns if the API surface allows projection"],"exampleFix":"// before\n// reading a table whose new Delta type has no vector mapping\nPCollection<Row> rows = input.apply(DeltaIO.read().withTable(path).withStartVersion(0L));\n// after\n// upgrade dependencies, e.g.\n// implementation 'org.apache.beam:beam-sdks-java-io-delta:<latest>'\n// implementation 'io.delta:delta-kernel-api:<latest>'\n// implementation 'io.delta:delta-kernel-defaults:<latest>'","handlingStrategy":"validation","validationCode":"// Same preflight as getFieldValue: verify all column types map to supported Beam types\nfor (StructField f : snapshot.getSchema().fields()) {\n  if (!isSupportedBeamMapping(f.getDataType())) {\n    throw new IllegalStateException(\"Column \" + f.getName() + \" uses unsupported vector type \" + f.getDataType());\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  rows = input.apply(deltaIO);\n} catch (UnsupportedOperationException e) {\n  if (e.getMessage().startsWith(\"Unsupported vector type:\")) {\n    // upgrade connector/kernel or rewrite the column to a supported type\n  } else { throw e; }\n}","preventionTips":["Align parquet-mr, delta kernel, and Beam Delta IO versions","Preflight new tables by reading a small version range before full pipeline runs","Avoid tables using brand-new Delta types until the connector supports them"],"tags":["java","apache-beam","delta-lake","unsupported-type","columnar"],"backgroundTag":"unsupported-operation","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}