{"record":{"id":"5b0ebb68798fa170","repo":"apache/iceberg","slug":"read-failure-possibly-due-to-parquet-246-try-sett-5b0ebb","errorCode":null,"errorMessage":"Read failure possibly due to PARQUET-246: try setting parquet.split.files to false (caused by: Can't read value in column %s at value %d out of %d in current page. repetition level: %d, definition level: %d)","messagePattern":"Read failure possibly due to PARQUET-246: try setting parquet\\.split\\.files to false \\(caused by: 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":132,"sourceCode":"  @Override\n  public int currentDefinitionLevel() {\n    Preconditions.checkArgument(currentDL >= 0, \"Should not read definition, past page end\");\n    return currentDL;\n  }\n\n  @Override\n  public int currentRepetitionLevel() {\n    //    Preconditions.checkArgument(currentDL >= 0, \"Should not read repetition, past page end\");\n    return currentRL;\n  }\n\n  @Override\n  public boolean nextBoolean() {\n    advance();\n    try {\n      return values.readBoolean();\n    } catch (RuntimeException e) {\n      throw handleRuntimeException(e);\n    }\n  }\n\n  @Override\n  public int nextInteger() {\n    advance();\n    try {\n      return values.readInteger();\n    } catch (RuntimeException e) {\n      throw handleRuntimeException(e);\n    }\n  }\n\n  @Override\n  public long nextLong() {\n    advance();\n    try {\n      return values.readLong();","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/parquet/src/main/java/org/apache/iceberg/parquet/PageIterator.java#L114-L150","documentation":"PageIterator.nextBoolean wraps any RuntimeException thrown while decoding a boolean page value into a RuntimeException referencing the known Parquet bug PARQUET-246, in which task/file splitting can corrupt v1 page reading. The inner message reports the column path, the value ordinal within the page, and the current repetition/definition levels so you can identify the corrupt position. Iceberg rethrows it with this hint because the usual remedy is to disable split-file reads rather than assume the data is unreadable.","triggerScenarios":"Reading a Parquet boolean column via the iceberg-parquet vectorized/arrow-free path when the page decoder's values buffer is exhausted or misaligned (value N out of M in the current page), typically after a row-group split mid-page (PARQUET-246) or a truncated/corrupt page produced by an older writer.","commonSituations":"Query engines (Spark/Flink) scanning a split of a v1 Parquet file where a page straddles the split boundary; files written by an old Parquet version; truncated files from failed uploads; reading with parquet.split.files enabled (default true).","solutions":["Set the read property parquet.split.files=false (e.g., spark.sql.files.maxPartitionBytes tuning aside, or table read property split-size very large) so a page is not read across a split boundary","Verify the file is not truncated: compare file size/checksum against the manifest and re-copy the data file","Rewrite the affected data files with a current Parquet/Iceberg writer version to regenerate pages","Catch the exception, log the column and value position, and fall back to a non-split read of that file"],"exampleFix":"// before (default)\n// spark reads parquet with splits enabled; mid-page reads can fail\n// after\nspark.conf.set(\"parquet.split.files\", \"false\")\n// or on the Iceberg read options\n// table scan option: split-size large enough to avoid mid-page splits","handlingStrategy":"try-catch","validationCode":"// validate file integrity before scanning\nTableScan scan = table.newScan();\nFileIO io = table.io();\nfor (FileScanTask task : scan.planFiles()) {\n  ContentFile<?> f = task.file();\n  if (io.newInputFile(f.location()).getLength() != f.fileSizeInBytes()) {\n    throw new IllegalStateException(\"Truncated data file: \" + f.location());\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  iterator.next();\n} catch (RuntimeException e) {\n  if (e.getMessage() != null && e.getMessage().contains(\"PARQUET-246\")) {\n    // re-read this file with splits disabled (parquet.split.files=false) or large split-size\n  } else {\n    throw e;\n  }\n}","preventionTips":["Set parquet.split.files=false (or scan split-size >= file size) when reading files written by older Parquet versions","Verify data-file sizes/checksums against the manifest before scanning","Rewrite legacy files with a current Iceberg/Parquet writer (rewrite_data_files procedure)","Monitor for repeated failures on the same file and quarantine it for inspection"],"tags":["parquet","read-corruption","page-iterator"],"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"}