{"record":{"id":"5145bb3b81003f5e","repo":"apache/iceberg","slug":"readbinary-is-not-supported","errorCode":null,"errorMessage":"readBinary is not supported","messagePattern":"readBinary is not supported","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/VectorizedValuesReader.java","lineNumber":80,"sourceCode":"  }\n\n  /** Read a single float */\n  default float readFloat() {\n    throw new UnsupportedOperationException(\"readFloat is not supported\");\n  }\n\n  /** Read a single double */\n  default double readDouble() {\n    throw new UnsupportedOperationException(\"readDouble is not supported\");\n  }\n\n  /**\n   * Read binary data of some length\n   *\n   * @param len The number of bytes to read\n   */\n  default Binary readBinary(int len) {\n    throw new UnsupportedOperationException(\"readBinary is not supported\");\n  }\n\n  /** Read `total` integers into `vec` starting at `vec[rowId]` */\n  default void readIntegers(int total, FieldVector vec, int rowId) {\n    throw new UnsupportedOperationException(\"readIntegers is not supported\");\n  }\n\n  /** Read `total` longs into `vec` starting at `vec[rowId]` */\n  default void readLongs(int total, FieldVector vec, int rowId) {\n    throw new UnsupportedOperationException(\"readLongs is not supported\");\n  }\n\n  /** Read `total` floats into `vec` starting at `vec[rowId]` */\n  default void readFloats(int total, FieldVector vec, int rowId) {\n    throw new UnsupportedOperationException(\"readFloats is not supported\");\n  }\n\n  /** Read `total` doubles into `vec` starting at `vec[rowId]` */","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/VectorizedValuesReader.java#L62-L98","documentation":"readBinary(int len) in VectorizedValuesReader is a default method that throws UnsupportedOperationException; only concrete readers that decode binary (e.g. BYTE_ARRAY/VARCHAR) values override it. It is reached via nextVal() for binary columns or through buffer() callers when the active reader does not support binary reads. The interface throws deliberately so unimplemented type paths fail loudly.","triggerScenarios":"nextVal() or buffer() calls readBinary(len) for a Parquet BYTE_ARRAY column, but the active VectorizedValuesReader subclass (a fallback/base reader) does not override readBinary().","commonSituations":"Reading string/binary columns with vectorized reads enabled where the selected reader lacks binary support; Iceberg versions where vectorized reading covers only primitive numeric types (strings were unsupported in early vectorized readers); custom reader implementations.","solutions":["Disable vectorized reads (read.arrow.enabled=false) so binary columns use the standard Parquet value reader.","Upgrade Iceberg to a version with vectorized binary/string support for your encoding.","If you own the reader class, implement readBinary(int len) reading len bytes from the page input."],"exampleFix":"// before\n// default readBinary(len) throws\n// after\n@Override\npublic Binary readBinary(int len) { return Binary.fromConstantByteArray(readBytes(len)); }","handlingStrategy":"fallback","validationCode":"// disable vectorized reads when schema has binary/string columns on old Iceberg\nif (schema.columns().stream().anyMatch(c -> c.type() instanceof Types.StringType || c.type() instanceof Types.BinaryType) && !binaryVectorizedSupported) {\n  props.put(\"read.arrow.enabled\", \"false\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Early Iceberg vectorized readers only cover numeric types; check version support for string/binary columns.","Catch UnsupportedOperationException and retry with read.arrow.enabled=false.","Upgrade Iceberg if binary vectorized reads are required for performance."],"tags":["arrow","parquet","vectorized-read","unsupported-operation"],"backgroundTag":"unsupported-operation","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"}