apache/flink · error · IOException

could not read page in col

Error message

could not read page in col {} as the dictionary was missing for encoding {}

What it means

Wraps an IOException raised while preparing a data page whose encoding is dictionary-based but the column's dictionary page was never read (or failed to load). The original I/O failure is chained; the encoding name shows which dictionary encoding triggered the path.

Solutions

  1. Address the cause reported by the error message: could not read page in col the reported value as the dictionary was missing for encoding 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 page in col the reported value as the dictionary was missing for encoding the reported value") and rerun the job or command.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Triggered at runtime when the operation fails because: could not read page in col the reported value as the dictionary was missing for encoding 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 page in col the reported value as the dictionary was missing for encoding the reported value.


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

Appendix: source

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

        int bitWidth = BytesUtils.getWidthFromMaxInt(descriptor.getMaxDefinitionLevel());
        // do not read the length from the stream. v2 pages handle dividing the page bytes.
        this.runLenDecoder = new RunLengthDecoder(bitWidth, false);
        this.runLenDecoder.initFromStream(
                this.pageValueCount, page.getDefinitionLevels().toInputStream());
        try {
            prepareNewPage(page.getDataEncoding(), page.getData().toInputStream());
        } catch (IOException e) {
            throw new IOException("could not read page " + page + " in col " + descriptor, e);
        }
    }

    private void prepareNewPage(Encoding dataEncoding, ByteBufferInputStream in)
            throws IOException {
        this.endOfPageValueCount = valuesRead + pageValueCount;
        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;

View on GitHub (pinned to 2f3c205e92)