{"record":{"id":"f46facdb250f975e","repo":"apache/iceberg","slug":"readlong-is-not-supported","errorCode":null,"errorMessage":"readLong is not supported","messagePattern":"readLong 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":61,"sourceCode":"\n  /** Read a single byte */\n  default byte readByte() {\n    throw new UnsupportedOperationException(\"readByte is not supported\");\n  }\n\n  /** Read a single short */\n  default short readShort() {\n    throw new UnsupportedOperationException(\"readShort is not supported\");\n  }\n\n  /** Read a single integer */\n  default int readInteger() {\n    throw new UnsupportedOperationException(\"readInteger is not supported\");\n  }\n\n  /** Read a single long */\n  default long readLong() {\n    throw new UnsupportedOperationException(\"readLong is not supported\");\n  }\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) {","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/VectorizedValuesReader.java#L43-L79","documentation":"VectorizedValuesReader is an interface whose default methods are intentionally unimplemented; each concrete reader subclass overrides only the methods its data type actually needs. readLong() hits the default implementation when the selected concrete reader does not support reading single long values. This is a programming/configuration mismatch: the vectorized Parquet decoder is being asked to perform an operation its implementation class never implemented.","triggerScenarios":"A DefaultVectorizedReader (or similar fallback subclass) is selected for the column's Parquet physical type, and VectorizedPageReader.nextVal() dispatches to readLong() for a LONG-annotated column. Happens when vectorized reading is enabled for a type combination whose reader class only implements the integer paths.","commonSituations":"Reading a Parquet long column with vectorized reads enabled where the reader factory chose a base/unsupported reader; custom or newly added physical-type support where the concrete reader forgot to override readLong; running with an Iceberg version where that type's vectorized support is not yet implemented.","solutions":["Disable vectorized reads for the table/read path (e.g. unset read.arrow.enabled / arrow-enabled=false) so the fallback Parquet row reader is used.","Check that the column's physical type is one supported by vectorized reading for your Iceberg version; upgrade Iceberg if support was added later.","If implementing a custom VectorizedValuesReader, override readLong() instead of inheriting the default."],"exampleFix":"// before (custom reader)\nclass MyReader implements VectorizedValuesReader { ... }\n// after\nclass MyReader implements VectorizedValuesReader {\n  @Override\n  public long readLong() { return buffer.getLong(offset); }\n}","handlingStrategy":"fallback","validationCode":"// before scanning with vectorized reads\nif (columnType != Types.LongType.get() || !vectorizedSupports(type, version)) {\n  readProps.put(\"read.arrow.enabled\", \"false\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only enable vectorized/Arrow reads for primitive numeric types supported by your Iceberg version.","Pin and test with the Iceberg version you deploy; vectorized type support grows over releases.","Catch UnsupportedOperationException in scan setup and retry with vectorized reads disabled."],"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-14T11:17:12.474Z"}