{"record":{"id":"de4f121d6c674f1d","repo":"apache/iceberg","slug":"not-a-valid-mode-this-mode","errorCode":null,"errorMessage":"not a valid mode \" + this.mode","messagePattern":"not a valid mode \" \\+ this\\.mode","errorType":"exception","errorClass":"ParquetDecodingException","httpStatus":null,"severity":"error","filePath":"arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/BaseVectorizedParquetValuesReader.java","lineNumber":206,"sourceCode":"          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          }\n          packedValuesBufferIdx = 0;\n          int valueIndex = 0;\n          while (valueIndex < this.currentCount) {\n            // values are bit packed 8 at a time, so reading bitWidth will always work\n            ByteBuffer buffer = inputStream.slice(bitWidth);\n            this.packer.unpack8Values(\n                buffer, buffer.position(), this.packedValuesBuffer, valueIndex);\n            valueIndex += 8;\n          }\n          return;\n        default:\n          throw new ParquetDecodingException(\"not a valid mode \" + this.mode);\n      }\n    } catch (IOException e) {\n      throw new ParquetDecodingException(\"Failed to read from input stream\", e);\n    }\n  }\n\n  @Override\n  public boolean readBoolean() {\n    return this.readInteger() != 0;\n  }\n\n  @Override\n  public void skip() {\n    throw new UnsupportedOperationException();\n  }\n\n  @Override\n  public int readValueDictionaryId() {","sourceCodeStart":188,"sourceCodeEnd":224,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/BaseVectorizedParquetValuesReader.java#L188-L224","documentation":"readNextGroup decodes RLE/bit-packed hybrid pages; an unknown mode value in the page header is not RLE or BIT_PACKED, so it throws ParquetDecodingException. This signals the page data cannot be decoded by this reader.","triggerScenarios":"A page header whose encoding mode is neither RLE nor PACKED during readNextGroup, reached from readInteger.","commonSituations":"Corrupted Parquet files, files written with encodings unsupported by the vectorized path, or truncated page data mid-scan.","solutions":["Disable vectorized reads so the full-featured Parquet decoder handles the page.","Validate the file with parquet-tools; if corrupt, regenerate the file.","Rewrite the data with a current Iceberg/Parquet writer version."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// catch (ParquetDecodingException e) {\n//   if (e.getMessage().contains(\"not a valid mode\")) {\n//     fallbackToNonVectorizedScan();\n//   } else throw e;\n// }","preventionTips":["Regenerate corrupt files from source data.","Verify file integrity after writes/checksums.","Keep writer/reader Parquet versions compatible."],"tags":["parquet","vectorized-reader","decoding","corrupt-data"],"backgroundTag":"invalid-enum-value","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"}