{"record":{"id":"da81d9e5794a551e","repo":"apache/iceberg","slug":"unsupported-type-binary","errorCode":null,"errorMessage":"Unsupported type: binary","messagePattern":"Unsupported type: binary","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"arrow/src/main/java/org/apache/iceberg/arrow/vectorized/ArrowVectorAccessor.java","lineNumber":73,"sourceCode":"\n  public int getInt(int rowId) {\n    throw new UnsupportedOperationException(\"Unsupported type: int\");\n  }\n\n  public long getLong(int rowId) {\n    throw new UnsupportedOperationException(\"Unsupported type: long\");\n  }\n\n  public float getFloat(int rowId) {\n    throw new UnsupportedOperationException(\"Unsupported type: float\");\n  }\n\n  public double getDouble(int rowId) {\n    throw new UnsupportedOperationException(\"Unsupported type: double\");\n  }\n\n  public byte[] getBinary(int rowId) {\n    throw new UnsupportedOperationException(\"Unsupported type: binary\");\n  }\n\n  public DecimalT getDecimal(int rowId, int precision, int scale) {\n    throw new UnsupportedOperationException(\"Unsupported type: decimal\");\n  }\n\n  public Utf8StringT getUTF8String(int rowId) {\n    throw new UnsupportedOperationException(\"Unsupported type: UTF8String\");\n  }\n\n  public ArrayT getArray(int rowId) {\n    throw new UnsupportedOperationException(\"Unsupported type: array\");\n  }\n\n  public ChildVectorT childColumn(int pos) {\n    if (childColumns != null) {\n      return childColumns[pos];\n    } else {","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/arrow/src/main/java/org/apache/iceberg/arrow/vectorized/ArrowVectorAccessor.java#L55-L91","documentation":"The base ArrowVectorAccessor.getBinary(int) is an unimplemented stub that always throws. Binary (VarBinary) accessors must override it; hitting the base means the accessor for this vector cannot return binary data. toVarBinaryVector depends on a subclass override.","triggerScenarios":"Reading a binary/string column through a non-binary accessor or raw base class; accessor factory mapping VarBinaryVector to a generic accessor.","commonSituations":"Custom readers materializing string/binary columns into engine vectors; subclasses missing the getBinary override; test code instantiating the base accessor directly.","solutions":["Use a VarBinary-backed accessor overriding getBinary: return vector.get(rowId).","Add the @Override getBinary to your subclass.","Verify accessor-factory dispatch maps VarBinary (and string) fields to the binary accessor."],"exampleFix":"// before\nclass MyAccessor extends ArrowVectorAccessor<VarBinaryVector> { } // getBinary missing\n// after\n@Override public byte[] getBinary(int rowId) { return vector.get(rowId); }","handlingStrategy":"type-guard","validationCode":"if (!(accessor instanceof BinaryAccessor)) { /* fallback */ }","typeGuard":"static boolean supportsBinary(ArrowVectorAccessor<?> a) {\n  return a.getClass() != ArrowVectorAccessor.class;\n}","tryCatchPattern":"try {\n  byte[] v = accessor.getBinary(rowId);\n} catch (UnsupportedOperationException e) {\n  if (\"Unsupported type: binary\".equals(e.getMessage())) { fallbackRead(rowId); } else { throw e; }\n}","preventionTips":["Map VarBinaryVector (and string) fields to binary-capable accessors.","Override getBinary in subclasses.","Test string/binary columns end-to-end through the vectorized reader."],"tags":["arrow","unsupported-type","vectorized-read","binary"],"backgroundTag":"method-not-implemented","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}