{"record":{"id":"e5b3504eac6c7f12","repo":"apache/iceberg","slug":"unsupported-type-float","errorCode":null,"errorMessage":"Unsupported type: float","messagePattern":"Unsupported type: float","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"arrow/src/main/java/org/apache/iceberg/arrow/vectorized/ArrowVectorAccessor.java","lineNumber":65,"sourceCode":"      }\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\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","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/arrow/src/main/java/org/apache/iceberg/arrow/vectorized/ArrowVectorAccessor.java#L47-L83","documentation":"The base ArrowVectorAccessor.getFloat(int) is an unimplemented stub that always throws. Float (float4) vector accessors must override it; invoking the base means the accessor for this vector does not support float extraction. toFloat4Vector in the vectorized readers depends on an overriding subclass.","triggerScenarios":"Reading a float column through a non-float accessor or the raw base class; factory code that maps float vectors to a generic accessor.","commonSituations":"Custom readers converting Arrow batches to engine vectors (toFloat4Vector path) with a mis-mapped accessor; subclass written without the float override.","solutions":["Use a Float4-backed accessor subclass that overrides getFloat to return vector.get(rowId).","Override getFloat in your subclass.","Verify the accessor factory dispatches Float4Vector to the float accessor."],"exampleFix":"// before\nclass MyAccessor extends ArrowVectorAccessor<Float4Vector> { } // getFloat missing\n// after\n@Override public float getFloat(int rowId) { return vector.get(rowId); }","handlingStrategy":"type-guard","validationCode":"if (!(accessor instanceof FloatAccessor)) { /* fallback */ }","typeGuard":"static boolean supportsFloat(ArrowVectorAccessor<?> a) {\n  return a.getClass() != ArrowVectorAccessor.class;\n}","tryCatchPattern":"try {\n  float v = accessor.getFloat(rowId);\n} catch (UnsupportedOperationException e) {\n  if (\"Unsupported type: float\".equals(e.getMessage())) { fallbackRead(rowId); } else { throw e; }\n}","preventionTips":["Map Float4Vector fields to float-capable accessors.","Override getFloat in subclasses.","Add float coverage to the accessor factory tests."],"tags":["arrow","unsupported-type","vectorized-read","float"],"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"}