{"record":{"id":"9471ab899f84c6e5","repo":"apache/iceberg","slug":"no-more-values-to-read-total-values-read-va","errorCode":null,"errorMessage":"No more values to read. Total values read:  \" + valuesRead + \", total count: \" + totalValueCount + \", trying to read \" + total + \" more.","messagePattern":"No more values to read\\. Total values read:  \" \\+ valuesRead \\+ \", total count: \" \\+ totalValueCount \\+ \", trying to read \" \\+ total \\+ \" more\\.","errorType":"exception","errorClass":"ParquetDecodingException","httpStatus":null,"severity":"error","filePath":"arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/VectorizedDeltaEncodedValuesReader.java","lineNumber":139,"sourceCode":"    int[] result = new int[total];\n    readValues(\n        total,\n        null,\n        rowId,\n        INT_SIZE,\n        (vec, idx, val) -> result[(int) (idx / INT_SIZE)] = (int) val);\n    return result;\n  }\n\n  @Override\n  public void readLongs(int total, FieldVector vec, int rowId) {\n    readValues(total, vec, rowId, LONG_SIZE, (f, i, v) -> f.getDataBuffer().setLong(i, v));\n  }\n\n  private void readValues(\n      int total, FieldVector vec, int rowId, int typeWidth, IntegerOutputWriter outputWriter) {\n    if (valuesRead + total > totalValueCount) {\n      throw new ParquetDecodingException(\n          \"No more values to read. Total values read:  \"\n              + valuesRead\n              + \", total count: \"\n              + totalValueCount\n              + \", trying to read \"\n              + total\n              + \" more.\");\n    }\n\n    int remaining = total;\n    int currentRowId = rowId;\n    // First value\n    if (valuesRead == 0 && total > 0) {\n      outputWriter.write(vec, ((long) (currentRowId + valuesRead) * typeWidth), firstValue);\n      lastValueRead = firstValue;\n      currentRowId++;\n      remaining--;\n    }","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/VectorizedDeltaEncodedValuesReader.java#L121-L157","documentation":"readValues validates that the requested number of values fits within the page's declared total value count before decoding DELTA_BINARY_PACKED data into an Arrow vector. If the caller asks for more values than remain (valuesRead + total > totalValueCount), the reader throws ParquetDecodingException. This guards against decoding past the end of a page, which usually means corrupt or inconsistent page metadata.","triggerScenarios":"Calling readInteger/readLong/readIntegers/readLongs (via the vectorized page iterator) with a batch total that exceeds the remaining values in the current page.","commonSituations":"Corrupted or truncated Parquet files, files written by buggy writers that misstate totalValueCount, or memory-pressure paths that request larger batches than the page contains.","solutions":["Validate/repair the Parquet file (e.g. rewrite it with a trusted writer such as Spark/Iceberg rewrite) since this usually indicates a corrupt page.","Update the writer that produced the files; mismatched totalValueCount points to a writer bug.","If reproducible on a specific library version, upgrade Iceberg/Parquet to get fixed batch-size handling, or disable vectorized reads as a workaround."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  // vectorized read of delta-encoded page\n} catch (ParquetDecodingException e) {\n  if (e.getMessage().startsWith(\"No more values to read\")) {\n    // treat file as corrupt: quarantine and rewrite, or retry with non-vectorized reader\n  } else throw e;\n}","preventionTips":["Validate files after writing (Parquet file metadata checks) before committing","Keep writer and reader library versions aligned","Monitor storage for truncated files from failed/partial uploads"],"tags":["parquet","decoding","corrupt-data"],"backgroundTag":"value-out-of-range","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"}