{"record":{"id":"8cd5c69e10ebb731","repo":"apache/iceberg","slug":"non-supported-byteswidth-byteswidth","errorCode":null,"errorMessage":"Non-supported bytesWidth: \" + bytesWidth","messagePattern":"Non-supported bytesWidth: \" \\+ bytesWidth","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/BaseVectorizedParquetValuesReader.java","lineNumber":176,"sourceCode":"      case 2:\n        {\n          int ch2 = inputStream.read();\n          int ch1 = inputStream.read();\n          return (ch1 << 8) + ch2;\n        }\n      case 3:\n        {\n          int ch3 = inputStream.read();\n          int ch2 = inputStream.read();\n          int ch1 = inputStream.read();\n          return (ch1 << 16) + (ch2 << 8) + ch3;\n        }\n      case 4:\n        {\n          return readIntLittleEndian();\n        }\n    }\n    throw new RuntimeException(\"Non-supported bytesWidth: \" + bytesWidth);\n  }\n\n  /** Reads the next group. */\n  void readNextGroup() {\n    try {\n      int header = readUnsignedVarInt();\n      this.mode = (header & 1) == 0 ? Mode.RLE : Mode.PACKED;\n      switch (mode) {\n        case RLE:\n          this.currentCount = header >>> 1;\n          this.currentValue = readIntLittleEndianPaddedOnBitWidth();\n          return;\n        case PACKED:\n          int numGroups = header >>> 1;\n          this.currentCount = numGroups * 8;\n          if (this.packedValuesBuffer.length < this.currentCount) {\n            this.packedValuesBuffer = new int[this.currentCount];\n          }","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/BaseVectorizedParquetValuesReader.java#L158-L194","documentation":"readIntLittleEndianPaddedOnBitWidth only supports values packed into 1, 2, or 4 bytes; any other bytesWidth indicates a decoding mode this vectorized RLE reader cannot handle, so it throws a RuntimeException.","triggerScenarios":"Decoding an RLE/bit-packed hybrid INTEGER column whose width resolves to a byte size other than 1, 2, or 4 inside readNextGroup.","commonSituations":"Reading a Parquet file written by an unusual producer or with an unexpected physical type width; corrupted or hand-crafted Parquet metadata.","solutions":["Rewrite the Parquet files with a standard writer (Spark/Iceberg) so integer widths are 1, 2, or 4 bytes.","Use the non-vectorized Parquet reader (disable vectorized reads) which supports the full decoding spec.","Verify the file is valid with parquet-tools; replace the corrupt source file."],"exampleFix":"// before\n.option(\"vectorization-enabled\", \"true\")\n// after\nspark.read.format(\"iceberg\").option(\"vectorization-enabled\", \"false\").load(\"t\")","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"// catch (RuntimeException e) {\n//   if (e.getMessage() != null && e.getMessage().contains(\"Non-supported bytesWidth\")) {\n//     retryWithVectorizationDisabled();\n//   } else throw e;\n// }","preventionTips":["Write Parquet files with standard producers (Spark/Iceberg).","Validate source files with parquet-tools before ingesting.","Fall back to non-vectorized reads for externally-produced files."],"tags":["parquet","vectorized-reader","decoding"],"backgroundTag":"invalid-argument-value","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"}