{"record":{"id":"17921586c92d3abf","repo":"apache/iceberg","slug":"can-t-read-value-in-column-s-at-value-d-out-of","errorCode":null,"errorMessage":"Can't read value in column %s at value %d out of %d in current page. repetition level: %d, definition level: %d","messagePattern":"Can't read value in column (.+?) at value (.+?) out of (.+?) in current page\\. repetition level: (.+?), definition level: (.+?)","errorType":"exception","errorClass":"ParquetDecodingException","httpStatus":null,"severity":"error","filePath":"parquet/src/main/java/org/apache/iceberg/parquet/PageIterator.java","lineNumber":225,"sourceCode":"    if (CorruptDeltaByteArrays.requiresSequentialReads(writerVersion, valueEncoding)\n        && exception instanceof ArrayIndexOutOfBoundsException) {\n      // this is probably PARQUET-246, which may happen if reading data with\n      // MR because this can't be detected without reading all footers\n      throw new ParquetDecodingException(\n          \"Read failure possibly due to \" + \"PARQUET-246: try setting parquet.split.files to false\",\n          new ParquetDecodingException(\n              String.format(\n                  Locale.ROOT,\n                  \"Can't read value in column %s at value %d out of %d in current page. \"\n                      + \"repetition level: %d, definition level: %d\",\n                  desc,\n                  triplesRead,\n                  triplesCount,\n                  currentRL,\n                  currentDL),\n              exception));\n    }\n    throw new ParquetDecodingException(\n        String.format(\n            Locale.ROOT,\n            \"Can't read value in column %s at value %d out of %d in current page. \"\n                + \"repetition level: %d, definition level: %d\",\n            desc,\n            triplesRead,\n            triplesCount,\n            currentRL,\n            currentDL),\n        exception);\n  }\n\n  @Override\n  protected void initDataReader(Encoding dataEncoding, ByteBufferInputStream in, int valueCount) {\n    ValuesReader previousReader = values;\n\n    this.valueEncoding = dataEncoding;\n","sourceCodeStart":207,"sourceCodeEnd":243,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/parquet/src/main/java/org/apache/iceberg/parquet/PageIterator.java#L207-L243","documentation":"Generic decoding failure wrapper: when a runtime exception occurs while reading a value and it is not attributable to PARQUET-246, PageIterator rethrows it as ParquetDecodingException describing the column, the value index within the page, and the current repetition/definition levels. This pinpoints where in the page decoding broke.","triggerScenarios":"Any RuntimeException surfaced from nextBoolean/nextInteger/nextLong/nextFloat/nextDouble/nextBinary that fails the PARQUET-246 check (e.g. IO problems, corrupt page buffers).","commonSituations":"Truncated or corrupt Parquet files; page data inconsistent with the page header's value counts; mismatched footer/split reads.","solutions":["Inspect the reported column and value index for file corruption; validate the file with parquet-tools","Re-read or rewrite the corrupted file from source","If caused by splitting, disable file splitting (see PARQUET-246)"],"exampleFix":"// before\n// crash decoding corrupt file\n// after\n// validate and rewrite\n// parquet-tools repair corrupt.parquet repaired.parquet","handlingStrategy":"try-catch","validationCode":"if (!ParquetFileReader.readFooter(conf, path).getFileMetaData().getSchema().equals(expectedSchema)) throw new IllegalStateException(\"Schema mismatch\");","typeGuard":null,"tryCatchPattern":"try {\n  iterator.nextLong();\n} catch (ParquetDecodingException e) {\n  // message includes column, value index, RL/DL — log and quarantine file\n  LOG.error(\"Decoding failed: {}\", e.getMessage());\n}","preventionTips":["Validate Parquet file integrity (checksums) after upload/copy","Watch for truncation when copying files to object storage","Use parquet-tools to verify files before registering with Iceberg"],"tags":["parquet","decoding","corrupt-data"],"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-14T16:17:12.679Z"}