prestodb/presto · error · UnsupportedOperationException

Dictionary encoding is not supported for:

Error message

 Dictionary encoding is not supported for: 

What it means

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.

Source

Thrown at presto-parquet/src/main/java/com/facebook/presto/parquet/ParquetEncoding.java:221

                return descriptor.getMaxDefinitionLevel();
            case VALUES:
                if (descriptor.getType() == BOOLEAN) {
                    return 1;
                }
            default:
                throw new ParquetDecodingException("Unsupported  values type: " + valuesType);
        }
    }

    public boolean usesDictionary()
    {
        return false;
    }

    public Dictionary initDictionary(ColumnDescriptor descriptor, DictionaryPage dictionaryPage)
            throws IOException
    {
        throw new UnsupportedOperationException(" Dictionary encoding is not supported for: " + name());
    }

    public ValuesReader getValuesReader(ColumnDescriptor descriptor, ValuesType valuesType)
    {
        throw new UnsupportedOperationException("Error decoding  values in encoding: " + this.name());
    }

    public ValuesReader getDictionaryBasedValuesReader(ColumnDescriptor descriptor, ValuesType valuesType, Dictionary dictionary)
    {
        throw new UnsupportedOperationException(" Dictionary encoding is not supported for: " + name());
    }
}

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Check encoding.usesDictionary() before calling initDictionary
  2. Route to getValuesReader for non-dictionary encodings
  3. Fix the calling reader logic to follow the dictionary/plain branch correctly
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at presto-parquet/src/main/java/com/facebook/presto/parquet/ParquetEncoding.java:221 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/22bc4ee7dc03ec25. Report an issue: GitHub.