apache/flink · error · IOException

could not read dictionary in col

Error message

could not read dictionary in col {}

What it means

Fires when a page arrives with a dictionary-based data encoding but the reader has no dictionary instance (the dictionary page was absent or already discarded). Without the dictionary the encoded values are undecodable, so reading the column page fails immediately.

Solutions

  1. Address the cause reported by the error message: could not read dictionary in col the reported value
  2. Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry.

Example fix

Correct the condition described ("could not read dictionary in col the reported value") and rerun the job or command.
Defensive patterns

Strategy: validation

When it happens

Trigger: Triggered at runtime when the operation fails because: could not read dictionary in col the reported value.

Common situations: Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: could not read dictionary in col the reported value.


AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14). Data as JSON: /api/errors/946d87f293c39df0. Report an issue: GitHub.

Appendix: source

Thrown at flink-formats/flink-parquet/src/main/java/org/apache/flink/formats/parquet/vector/reader/AbstractColumnReader.java:256

        if (dataEncoding.usesDictionary()) {
            if (dictionary == null) {
                throw new IOException(
                        "could not read page in col "
                                + descriptor
                                + " as the dictionary was missing for encoding "
                                + dataEncoding);
            }
            @SuppressWarnings("deprecation")
            Encoding plainDict = Encoding.PLAIN_DICTIONARY; // var to allow warning suppression
            if (dataEncoding != plainDict && dataEncoding != Encoding.RLE_DICTIONARY) {
                throw new UnsupportedOperationException("Unsupported encoding: " + dataEncoding);
            }
            this.dataInputStream = null;
            this.dictionaryIdsDecoder = new RunLengthDecoder();
            try {
                this.dictionaryIdsDecoder.initFromStream(pageValueCount, in);
            } catch (IOException e) {
                throw new IOException("could not read dictionary in col " + descriptor, e);
            }
            this.isCurrentPageDictionaryEncoded = true;
        } else {
            if (dataEncoding != Encoding.PLAIN) {
                throw new UnsupportedOperationException("Unsupported encoding: " + dataEncoding);
            }
            this.dictionaryIdsDecoder = null;
            LOG.debug("init from page at offset {} for length {}", in.position(), in.available());
            this.dataInputStream = in.remainingStream();
            this.isCurrentPageDictionaryEncoded = false;
        }

        afterReadPage();
    }

    final ByteBuffer readDataBuffer(int length) {
        try {
            return dataInputStream.slice(length).order(ByteOrder.LITTLE_ENDIAN);

View on GitHub (pinned to 2f3c205e92)