{"record":{"id":"22bc4ee7dc03ec25","repo":"prestodb/presto","slug":"dictionary-encoding-is-not-supported-for","errorCode":null,"errorMessage":" Dictionary encoding is not supported for: ","messagePattern":" Dictionary encoding is not supported for: ","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"presto-parquet/src/main/java/com/facebook/presto/parquet/ParquetEncoding.java","lineNumber":221,"sourceCode":"                return descriptor.getMaxDefinitionLevel();\n            case VALUES:\n                if (descriptor.getType() == BOOLEAN) {\n                    return 1;\n                }\n            default:\n                throw new ParquetDecodingException(\"Unsupported  values type: \" + valuesType);\n        }\n    }\n\n    public boolean usesDictionary()\n    {\n        return false;\n    }\n\n    public Dictionary initDictionary(ColumnDescriptor descriptor, DictionaryPage dictionaryPage)\n            throws IOException\n    {\n        throw new UnsupportedOperationException(\" Dictionary encoding is not supported for: \" + name());\n    }\n\n    public ValuesReader getValuesReader(ColumnDescriptor descriptor, ValuesType valuesType)\n    {\n        throw new UnsupportedOperationException(\"Error decoding  values in encoding: \" + this.name());\n    }\n\n    public ValuesReader getDictionaryBasedValuesReader(ColumnDescriptor descriptor, ValuesType valuesType, Dictionary dictionary)\n    {\n        throw new UnsupportedOperationException(\" Dictionary encoding is not supported for: \" + name());\n    }\n}\n","sourceCodeStart":203,"sourceCodeEnd":234,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-parquet/src/main/java/com/facebook/presto/parquet/ParquetEncoding.java#L203-L234","documentation":"Base-class sentinel in ParquetEncoding.initDictionary: this encoding (the unnamed non-dictionary ones) never uses a dictionary, so requesting one is a misuse of the API — the reader should have consulted usesDictionary() before calling. Not a data problem.","triggerScenarios":"Thrown at presto-parquet/src/main/java/com/facebook/presto/parquet/ParquetEncoding.java:221 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check encoding.usesDictionary() before calling initDictionary","Route to getValuesReader for non-dictionary encodings","Fix the calling reader logic to follow the dictionary/plain branch correctly"],"exampleFix":null,"handlingStrategy":"type-guard","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"}