prestodb/presto · error · ParquetCorruptionException

%s has more than one dictionary page in column chunk

Error message

%s has more than one dictionary page in column chunk

What it means

Consistency check while iterating pages in a column chunk: the Parquet spec allows at most one dictionary page per chunk, and a second one was encountered. Indicates a writer bug or corrupt page stream within the chunk.

Source

Thrown at presto-parquet/src/main/java/com/facebook/presto/parquet/reader/ParquetColumnChunk.java:174

            @Override
            public DataPage next()
            {
                DataPage readPage = null;
                try {
                    byte[] pageHeaderAdditionalAuthenticationData = dataPageHeaderAdditionalAuthenticationData;
                    if (headerBlockDecryptor != null) {
                        // Important: this verifies file integrity (makes sure dictionary page had not been removed)
                        AesCipher.quickUpdatePageAAD(dataPageHeaderAdditionalAuthenticationData, pageOrdinal);
                    }
                    PageHeader pageHeader = readPageHeader(headerBlockDecryptor, pageHeaderAdditionalAuthenticationData);
                    int uncompressedPageSize = pageHeader.getUncompressed_page_size();
                    int compressedPageSize = pageHeader.getCompressed_page_size();
                    long firstRowIndex;
                    switch (pageHeader.type) {
                        case DICTIONARY_PAGE:
                            if (dictionaryPage != null) {
                                throw new ParquetCorruptionException("%s has more than one dictionary page in column chunk", descriptor.getColumnDescriptor());
                            }
                            break;
                        case DATA_PAGE:
                            firstRowIndex = PageReader.getFirstRowIndex(dataPageCount, offsetIndex);
                            readPage = readDataPageV1(pageHeader, uncompressedPageSize, compressedPageSize, firstRowIndex);
                            valueCount += pageHeader.getData_page_header().getNum_values();
                            dataPageCount = dataPageCount + 1;
                            pageOrdinal = pageOrdinal + 1;
                            break;
                        case DATA_PAGE_V2:
                            firstRowIndex = PageReader.getFirstRowIndex(dataPageCount, offsetIndex);
                            readPage = readDataPageV2(pageHeader, uncompressedPageSize, compressedPageSize, firstRowIndex);
                            valueCount += pageHeader.getData_page_header_v2().getNum_values();
                            dataPageCount = dataPageCount + 1;
                            pageOrdinal = pageOrdinal + 1;
                            break;
                        default:
                            stream.skip(compressedPageSize);

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Rewrite the file with a spec-conformant writer
  2. Report a writer bug if the file comes from a tool emitting multiple dictionary pages
  3. Validate the page headers with parquet-tools to confirm duplication
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at presto-parquet/src/main/java/com/facebook/presto/parquet/reader/ParquetColumnChunk.java:174 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/89512e457da575b2. Report an issue: GitHub.