{"record":{"id":"47b09651850282c0","repo":"apache/iceberg","slug":"failed-to-read-binary-data","errorCode":null,"errorMessage":"Failed to read binary data","messagePattern":"Failed to read binary data","errorType":"exception","errorClass":"UncheckedIOException","httpStatus":null,"severity":"error","filePath":"arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/VectorizedDeltaLengthByteArrayValuesReader.java","lineNumber":70,"sourceCode":"  int lengthForCurrentRow() {\n    return lengths[currentRow];\n  }\n\n  @Override\n  public Binary readBinary(int len) {\n    try {\n      ByteBuffer buffer = dataStream.slice(len);\n      this.currentRow++;\n      if (buffer.hasArray()) {\n        return Binary.fromConstantByteArray(\n            buffer.array(), buffer.arrayOffset() + buffer.position(), len);\n      } else {\n        byte[] bytes = new byte[len];\n        buffer.get(bytes);\n        return Binary.fromConstantByteArray(bytes);\n      }\n    } catch (IOException e) {\n      throw new UncheckedIOException(\"Failed to read binary data\", e);\n    }\n  }\n\n  @Override\n  public int readInteger() {\n    return lengths[currentRow];\n  }\n\n  @Override\n  public void skip() {\n    throw new UnsupportedOperationException(\"skip is not supported\");\n  }\n}\n","sourceCodeStart":52,"sourceCodeEnd":84,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/VectorizedDeltaLengthByteArrayValuesReader.java#L52-L84","documentation":"VectorizedDeltaLengthByteArrayValuesReader.readBinary reads the length-prefixed binary value (DELTA_LENGTH_BYTE_ARRAY encoding) from the buffered byte stream. An IOException while getting the length or copying bytes is wrapped in UncheckedIOException with this message. It means the encoded binary data could not be read from the page buffer.","triggerScenarios":"readBinary (or readBytes) encounters IOException while reading a length-prefixed string/binary value from the page's input buffer.","commonSituations":"Corrupted or truncated data pages holding delta-length-encoded strings/binary columns, or buffer underflow from misaligned decoding state.","solutions":["Retry the scan to rule out transient storage IO errors.","Validate the Parquet file and rewrite corrupted files from source data.","Upgrade/fix the writer that produced DELTA_LENGTH_BYTE_ARRAY-encoded files.","Disable vectorized reads to use the standard Parquet reader as a workaround."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  // vectorized read\n} catch (UncheckedIOException e) {\n  if (e.getMessage().equals(\"Failed to read binary data\") && isTransient(e.getCause()) && attempt < maxAttempts) {\n    // retry scan\n  } else throw e;\n}","preventionTips":["Enable scan-level retries for object storage","Validate file integrity post-write (checksums)","Keep writer/reader versions aligned for DELTA_LENGTH_BYTE_ARRAY"],"tags":["parquet","decoding","io"],"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"}