pola-rs/polars · error · DeltaProtocolError

The table's minimum reader version is {table_protocol.min_re

Error message

The table's minimum reader version is {table_protocol.min_reader_version} but polars delta scanner only supports version 1 or {MAX_SUPPORTED_READER_VERSION} with these reader features: {SUPPORTED_READER_FEATURES}

What it means

Raised as DeltaProtocolError when the table's min_reader_version exceeds what the polars delta scanner supports (or equals the explicitly unsupported version). Delta tables declare the minimum protocol a reader must implement; if the table was written with a newer protocol than polars + deltalake can honour, the read is refused rather than producing wrong results.

Source

Thrown at py-polars/src/polars/io/delta/_dataset.py:291

                    {**(self.storage_options or {}), **credential_provider_creds}
                    if self.storage_options is not None
                    or self.credential_provider_builder is not None
                    else None
                ),
                delta_table_options=self.delta_table_options,
            )

            table_protocol = table.protocol()

            if (
                table_protocol.min_reader_version > MAX_SUPPORTED_READER_VERSION
                or table_protocol.min_reader_version == NOT_SUPPORTED_READER_VERSION
            ):
                msg = (
                    f"The table's minimum reader version is {table_protocol.min_reader_version} "
                    f"but polars delta scanner only supports version 1 or {MAX_SUPPORTED_READER_VERSION} with these reader features: {SUPPORTED_READER_FEATURES}"
                )
                raise DeltaProtocolError(msg)
            if (
                table_protocol.min_reader_version >= 3
                and table_protocol.reader_features is not None
            ):
                missing_features = {*table_protocol.reader_features}.difference(
                    SUPPORTED_READER_FEATURES
                )
                if len(missing_features) > 0:
                    msg = f"The table has set these reader features: {missing_features} but these are not yet supported by the polars delta scanner."
                    raise DeltaProtocolError(msg)

            self.table_.set(table)

        return self.table_.get()  # type: ignore[return-value]

    def __getstate__(self) -> dict[str, Any]:
        self.table_uri()
        return self.__dict__

View on GitHub (pinned to df599052da)

Solutions

  1. Upgrade polars (and deltalake) — supported reader versions advance with releases
  2. Rewrite the table with a lower protocol / without the new features (e.g. delta-rs writer options or a Databricks table-property reset plus rewrite)
  3. Read via the deltalake library (DeltaTable.to_pyarrow_dataset / to_pyarrow_table) and convert to polars if its reader supports the version
  4. Copy the data to a fresh table written by an older writer, then scan that

Example fix

# before
pl.scan_delta("s3://bucket/table")  # DeltaProtocolError: min_reader_version too high

# after
from deltalake import DeltaTable
df = pl.from_arrow(DeltaTable("s3://bucket/table").to_pyarrow_table())
Defensive patterns

Strategy: try-catch

Validate before calling

from deltalake import DeltaTable

proto = DeltaTable(path).protocol()
assert proto.min_reader_version <= MAX_SUPPORTED, "table protocol too new for polars scanner"

Try / catch

try:
    df = pl.scan_delta(path).collect()
except DeltaProtocolError:
    from deltalake import DeltaTable
    df = pl.from_arrow(DeltaTable(path).to_pyarrow_table())

Prevention

When it happens

Trigger: pl.scan_delta()/read_delta() on a table whose protocol min_reader_version is above MAX_SUPPORTED_READER_VERSION (e.g. a table written with reader version 3+ features by Databricks or newer delta-rs).

Common situations: Tables written by Databricks with newer table features enabled; tables created with column mapping or other v3 features; polars/deltalake version lagging behind the writer's protocol.

Related errors


AI-assisted analysis of pola-rs/polars@df599052da (2026-08-16). Data as JSON: /api/errors/edbceb1b8a0bbfd5. Report an issue: GitHub.