{"record":{"id":"cefdcd26d29ee5a2","repo":"apache/iceberg","slug":"unsupported-type-int","errorCode":null,"errorMessage":"Unsupported type: int","messagePattern":"Unsupported type: int","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"arrow/src/main/java/org/apache/iceberg/arrow/vectorized/ArrowVectorAccessor.java","lineNumber":57,"sourceCode":"    if (childColumns != null) {\n      for (ChildVectorT column : childColumns) {\n        try {\n          // Closing an ArrowColumnVector is expected to not throw any exception\n          column.close();\n        } catch (Exception e) {\n          throw new RuntimeException(e);\n        }\n      }\n    }\n    vector.close();\n  }\n\n  public boolean getBoolean(int rowId) {\n    throw new UnsupportedOperationException(\"Unsupported type: boolean\");\n  }\n\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","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/arrow/src/main/java/org/apache/iceberg/arrow/vectorized/ArrowVectorAccessor.java#L39-L75","documentation":"The base ArrowVectorAccessor.getInt(int) is an unimplemented stub that always throws. It is only meant as a default; concrete accessors for integer-backed Arrow vectors must override it. Hitting it means the accessor instance lacks integer support.","triggerScenarios":"Calling getInt on an accessor whose concrete subclass (or a generic accessor) does not implement int extraction — e.g. reading an int column through an accessor created for a different vector type.","commonSituations":"Custom engines building accessors by hand; new type mappings not routed to the correct subclass; reflection-based or test code instantiating ArrowVectorAccessor directly.","solutions":["Ensure int columns get an accessor subclass that overrides getInt (e.g. an IntVector-backed accessor).","Override getInt in your subclass if you extend ArrowVectorAccessor.","Fall back to the non-vectorized reader if the vectorized path cannot supply a proper accessor."],"exampleFix":"// before\nArrowVectorAccessor acc = new ArrowVectorAccessor<>(vector); // base stubs\n// after\nIntAccessor acc = new IntAccessor(vector); // overrides getInt\n// @Override public int getInt(int rowId) { return vector.get(rowId); }","handlingStrategy":"type-guard","validationCode":"if (!(accessor instanceof IntAccessor)) { /* fallback to row reader */ }","typeGuard":"static boolean supportsInt(ArrowVectorAccessor<?> a) {\n  return a.getClass() != ArrowVectorAccessor.class;\n}","tryCatchPattern":"try {\n  int v = accessor.getInt(rowId);\n} catch (UnsupportedOperationException e) {\n  if (\"Unsupported type: int\".equals(e.getMessage())) { fallbackRead(rowId); } else { throw e; }\n}","preventionTips":["Route IntVector fields to int-capable accessor subclasses.","Override getInt in any custom accessor subclass.","Test the accessor factory for every supported Arrow type."],"tags":["arrow","unsupported-type","vectorized-read","int"],"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-14T16:17:12.679Z"}