{"record":{"id":"e854836f5fe74193","repo":"apache/iceberg","slug":"unsupported-type-boolean","errorCode":null,"errorMessage":"Unsupported type: boolean","messagePattern":"Unsupported type: boolean","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"arrow/src/main/java/org/apache/iceberg/arrow/vectorized/ArrowVectorAccessor.java","lineNumber":53,"sourceCode":"  }\n\n  @Override\n  public void close() {\n    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","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/arrow/src/main/java/org/apache/iceberg/arrow/vectorized/ArrowVectorAccessor.java#L35-L71","documentation":"ArrowVectorAccessor is an abstract base whose getBoolean(int) is a default stub that always throws UnsupportedOperationException. A concrete subclass was expected to override it for boolean-backed vectors, but the base implementation was invoked, meaning no accessor was registered for boolean columns.","triggerScenarios":"Calling getBoolean on an ArrowVectorAccessor instance whose concrete class does not override getBoolean — e.g. a generic/passthrough accessor created for a column type without a dedicated accessor subclass.","commonSituations":"Custom vectorized-read extensions that build accessors generically without wiring every primitive type; new Iceberg/Arrow type mappings added without updating accessor factory; direct use of the base class in tests or custom code.","solutions":["Use the accessor factory for the vector's actual Arrow type so a boolean-capable accessor subclass is created.","Override getBoolean in your concrete accessor subclass if you are extending ArrowVectorAccessor.","If boolean columns hit this via the vectorized reader, disable vectorized reads for that scan or upgrade Iceberg to a version with full boolean support."],"exampleFix":"// before (subclass missing override)\nclass MyAccessor extends ArrowVectorAccessor { }\n// after\nclass MyAccessor extends ArrowVectorAccessor<BoolVector> {\n  @Override public boolean getBoolean(int rowId) { return vector.get(rowId); }\n}","handlingStrategy":"type-guard","validationCode":"if (!(accessor instanceof BooleanAccessor)) {\n  // accessor cannot read booleans; use fallback path\n}","typeGuard":"static boolean supportsBoolean(ArrowVectorAccessor<?> a) {\n  return !(a.getClass() == ArrowVectorAccessor.class);\n}","tryCatchPattern":"try {\n  boolean v = accessor.getBoolean(rowId);\n} catch (UnsupportedOperationException e) {\n  if (\"Unsupported type: boolean\".equals(e.getMessage())) {\n    fallbackRead(rowId);\n  } else { throw e; }\n}","preventionTips":["Always obtain accessors from the accessor factory keyed on the Arrow Field type.","Override all typed getters when subclassing ArrowVectorAccessor.","Add a unit test asserting each primitive type has an overriding accessor."],"tags":["arrow","unsupported-type","vectorized-read","boolean"],"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"}