{"record":{"id":"cce6adc41f46a078","repo":"apache/iceberg","slug":"error-reading-mini-block","errorCode":null,"errorMessage":"Error reading mini block.","messagePattern":"Error reading mini block\\.","errorType":"exception","errorClass":"ParquetDecodingException","httpStatus":null,"severity":"error","filePath":"arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/VectorizedDeltaEncodedValuesReader.java","lineNumber":164,"sourceCode":"              + \" 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    }\n\n    while (remaining > 0) {\n      int loadedRows;\n      try {\n        loadedRows = loadMiniBlockToOutput(remaining, vec, currentRowId, typeWidth, outputWriter);\n      } catch (IOException e) {\n        throw new ParquetDecodingException(\"Error reading mini block.\", e);\n      }\n      currentRowId += loadedRows;\n      remaining -= loadedRows;\n    }\n    valuesRead = total - remaining;\n  }\n\n  /**\n   * Read from a mini block. Read at most 'remaining' values into output.\n   *\n   * @return the number of values read into output\n   */\n  private int loadMiniBlockToOutput(\n      int remaining, FieldVector vec, int rowId, int typeWidth, IntegerOutputWriter outputWriter)\n      throws IOException {\n\n    // new block; read the block header\n    if (remainingInBlock == 0) {","sourceCodeStart":146,"sourceCodeEnd":182,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/VectorizedDeltaEncodedValuesReader.java#L146-L182","documentation":"While streaming mini blocks of a DELTA_BINARY_PACKED page into the Arrow output vector, loadMiniBlockToOutput may throw IOException from the underlying stream. The reader wraps it in ParquetDecodingException with this message, preserving the cause. It means the encoded mini-block bytes could not be read from the page's input stream.","triggerScenarios":"loadMiniBlockToOutput raises IOException mid-page while reading delta-encoded int/long values into an Arrow vector.","commonSituations":"Truncated or corrupted files (HDFS/S3 reads failing mid-page), network/IO errors during scan, or a page whose mini-block data ends earlier than the header promised.","solutions":["Retry the query to rule out transient IO/network errors (especially on object storage).","Verify file integrity; truncated files must be re-written from source data.","Check storage-layer logs (S3/HDFS) for read failures and fix connectivity or permissions.","Disable vectorized reads as a temporary workaround if the plain reader can handle the file."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  // vectorized read\n} catch (ParquetDecodingException e) {\n  if (e.getMessage().equals(\"Error reading mini block.\") && attempt < maxAttempts) {\n    // retry — likely transient storage IO error\n  } else throw e;\n}","preventionTips":["Use retry policies on object-storage-backed scans","Verify file completeness after upload (checksum/size checks)","Watch storage-layer logs for mid-read failures"],"tags":["parquet","io","decoding"],"backgroundTag":"file-read-failed","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"}