{"record":{"id":"c567667b9523b258","repo":"apache/iceberg","slug":"readlongs-is-not-supported","errorCode":null,"errorMessage":"readLongs is not supported","messagePattern":"readLongs 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":90,"sourceCode":"  }\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]` */\n  default void readDoubles(int total, FieldVector vec, int rowId) {\n    throw new UnsupportedOperationException(\"readDoubles is not supported\");\n  }\n\n  /**\n   * Initialize the reader from a page. See {@link ValuesReader#initFromPage(int,\n   * ByteBufferInputStream)}.\n   */\n  void initFromPage(int valueCount, ByteBufferInputStream in) throws IOException;\n}","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/VectorizedValuesReader.java#L72-L108","documentation":"readLongs(total, vec, rowId) is the batch variant for long columns on VectorizedValuesReader; its default body throws UnsupportedOperationException. Real readers override it to bulk-decode longs into a BigIntVector. nextVals() dispatching here means the active reader class does not implement the batch long path.","triggerScenarios":"nextVals(total) attempts bulk fill of an Arrow long vector for a Parquet INT64 column, but the active VectorizedValuesReader subclass does not override readLongs().","commonSituations":"Vectorized scans of bigint/timestamp columns where the reader factory selected a fallback reader; encodings whose dedicated reader only implements batch integers; custom reader implementations.","solutions":["Disable vectorized reads (read.arrow.enabled=false) to use the row-at-a-time Parquet reader.","Upgrade Iceberg to get batch long support for this type/encoding.","Override readLongs() in the concrete reader to fill vec[rowId..rowId+total)."],"exampleFix":"// before\n// default readLongs throws\n// after\n@Override\npublic void readLongs(int total, FieldVector vec, int rowId) {\n  for (int i = 0; i < total; i++) ((BigIntVector) vec).setSafe(rowId + i, readLong());\n}","handlingStrategy":"try-catch","validationCode":"// confirm long column before batch path\nif (!columnType.equals(Types.LongType.get())) props.put(\"read.arrow.enabled\", \"false\");","typeGuard":null,"tryCatchPattern":"try {\n  taskReader.readBatch();\n} catch (UnsupportedOperationException e) {\n  return fallbackRowReader();\n}","preventionTips":["Ensure the selected reader class overrides readLongs before enabling Arrow batch scans.","Avoid mixing custom readers from different Iceberg versions.","Add a unit test scanning long columns with vectorization enabled."],"tags":["arrow","parquet","vectorized-read","batch-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"}