{"record":{"id":"89512e457da575b2","repo":"prestodb/presto","slug":"s-has-more-than-one-dictionary-page-in-column-chu","errorCode":null,"errorMessage":"%s has more than one dictionary page in column chunk","messagePattern":"(.+?) has more than one dictionary page in column chunk","errorType":"exception","errorClass":"ParquetCorruptionException","httpStatus":null,"severity":"error","filePath":"presto-parquet/src/main/java/com/facebook/presto/parquet/reader/ParquetColumnChunk.java","lineNumber":174,"sourceCode":"\n            @Override\n            public DataPage next()\n            {\n                DataPage readPage = null;\n                try {\n                    byte[] pageHeaderAdditionalAuthenticationData = dataPageHeaderAdditionalAuthenticationData;\n                    if (headerBlockDecryptor != null) {\n                        // Important: this verifies file integrity (makes sure dictionary page had not been removed)\n                        AesCipher.quickUpdatePageAAD(dataPageHeaderAdditionalAuthenticationData, pageOrdinal);\n                    }\n                    PageHeader pageHeader = readPageHeader(headerBlockDecryptor, pageHeaderAdditionalAuthenticationData);\n                    int uncompressedPageSize = pageHeader.getUncompressed_page_size();\n                    int compressedPageSize = pageHeader.getCompressed_page_size();\n                    long firstRowIndex;\n                    switch (pageHeader.type) {\n                        case DICTIONARY_PAGE:\n                            if (dictionaryPage != null) {\n                                throw new ParquetCorruptionException(\"%s has more than one dictionary page in column chunk\", descriptor.getColumnDescriptor());\n                            }\n                            break;\n                        case DATA_PAGE:\n                            firstRowIndex = PageReader.getFirstRowIndex(dataPageCount, offsetIndex);\n                            readPage = readDataPageV1(pageHeader, uncompressedPageSize, compressedPageSize, firstRowIndex);\n                            valueCount += pageHeader.getData_page_header().getNum_values();\n                            dataPageCount = dataPageCount + 1;\n                            pageOrdinal = pageOrdinal + 1;\n                            break;\n                        case DATA_PAGE_V2:\n                            firstRowIndex = PageReader.getFirstRowIndex(dataPageCount, offsetIndex);\n                            readPage = readDataPageV2(pageHeader, uncompressedPageSize, compressedPageSize, firstRowIndex);\n                            valueCount += pageHeader.getData_page_header_v2().getNum_values();\n                            dataPageCount = dataPageCount + 1;\n                            pageOrdinal = pageOrdinal + 1;\n                            break;\n                        default:\n                            stream.skip(compressedPageSize);","sourceCodeStart":156,"sourceCodeEnd":192,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-parquet/src/main/java/com/facebook/presto/parquet/reader/ParquetColumnChunk.java#L156-L192","documentation":"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.","triggerScenarios":"Thrown at presto-parquet/src/main/java/com/facebook/presto/parquet/reader/ParquetColumnChunk.java:174 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Rewrite the file with a spec-conformant writer","Report a writer bug if the file comes from a tool emitting multiple dictionary pages","Validate the page headers with parquet-tools to confirm duplication"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}