{"record":{"id":"1021ce4a091a25e8","repo":"apache/iceberg","slug":"could-not-read-page-in-col-desc-as-the-dic","errorCode":null,"errorMessage":"could not read page in col \" + desc + \" as the dictionary was missing for encoding \" + dataEncoding","messagePattern":"could not read page in col \" \\+ desc \\+ \" as the dictionary was missing for encoding \" \\+ dataEncoding","errorType":"exception","errorClass":"ParquetDecodingException","httpStatus":null,"severity":"error","filePath":"arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/VectorizedPageIterator.java","lineNumber":77,"sourceCode":"  private DictionaryDecodeMode dictionaryDecodeMode;\n\n  public void setAllPagesDictEncoded(boolean allDictEncoded) {\n    this.allPagesDictEncoded = allDictEncoded;\n  }\n\n  @Override\n  protected void reset() {\n    super.reset();\n    this.valuesReader = null;\n    this.vectorizedDefinitionLevelReader = null;\n  }\n\n  @Override\n  protected void initDataReader(Encoding dataEncoding, ByteBufferInputStream in, int valueCount) {\n    ValuesReader previousReader = (ValuesReader) valuesReader;\n    if (dataEncoding.usesDictionary()) {\n      if (dictionary == null) {\n        throw new ParquetDecodingException(\n            \"could not read page in col \"\n                + desc\n                + \" as the dictionary was missing for encoding \"\n                + dataEncoding);\n      }\n      try {\n        dictionaryEncodedValuesReader =\n            new VectorizedDictionaryEncodedParquetValuesReader(\n                desc.getMaxDefinitionLevel(), setArrowValidityVector);\n        dictionaryEncodedValuesReader.initFromPage(valueCount, in);\n        if (ParquetUtil.isIntType(desc.getPrimitiveType()) || !allPagesDictEncoded) {\n          dictionaryDecodeMode = DictionaryDecodeMode.EAGER;\n        } else {\n          dictionaryDecodeMode = DictionaryDecodeMode.LAZY;\n        }\n      } catch (IOException e) {\n        throw new ParquetDecodingException(\"could not read page in col \" + desc, e);\n      }","sourceCodeStart":59,"sourceCodeEnd":95,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/VectorizedPageIterator.java#L59-L95","documentation":"VectorizedPageIterator.initDataReader starts decoding a data page whose encoding uses a dictionary, but no dictionary has been set for this column chunk. Iceberg throws ParquetDecodingException because dictionary-encoded pages cannot be decoded without their dictionary page. This usually means the dictionary page was skipped, lost, or the file is malformed.","triggerScenarios":"initDataReader receives a dataEncoding.usesDictionary()==true while the dictionary field is null for the column.","commonSituations":"Corrupted files missing dictionary pages, custom readers that skip dictionary pages, or row-group/page iteration that started mid-chunk after the dictionary page.","solutions":["Ensure the full column chunk including the dictionary page is read (don't skip pages when iterating).","Validate and rewrite the corrupt Parquet file if its dictionary page is genuinely missing.","Upgrade Iceberg if a known bug in dictionary page handling matches your version.","Disable vectorized reads as a fallback to the standard Parquet reader."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  // vectorized read\n} catch (ParquetDecodingException e) {\n  if (e.getMessage().contains(\"dictionary was missing\")) {\n    // re-read the full column chunk including dictionary page, or fall back to non-vectorized reader\n  } else throw e;\n}","preventionTips":["Always read complete column chunks; never skip dictionary pages","Validate files for missing dictionary pages before commit","Upgrade Iceberg if your version has known dictionary-page handling bugs"],"tags":["parquet","dictionary-encoding","decoding"],"backgroundTag":"resource-not-found","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"}