Skip to content

[Data][Delta DSv2 features][1/5] Require deltalake 1.5.0 or later in read_delta - #68504

Draft
abhishekverma-ray wants to merge 1 commit into
abhishek/delta-dsv2-8-v2-checkpointfrom
abhishek/delta-features-1-min-version
Draft

abhishekverma-ray wants to merge 1 commit into
abhishek/delta-dsv2-8-v2-checkpointfrom
abhishek/delta-features-1-min-version

Conversation

@abhishekverma-ray

Copy link
Copy Markdown
Contributor

Summary

read_delta now checks the installed deltalake release right after importing it and raises a clear ImportError if it's older than 1.5.0, the version CI tests.

This is the first of five PRs that add Delta features on top of the Delta DataSourceV2 stack; its base is the top of that stack (#68287).

Before

Ray declares no deltalake dependency. An older deltalake (0.x returns PyArrow tables and has a different API) failed deep inside the reader with an unrelated error.

After

read_delta raises, for example:

ImportError: `ray.data.read_delta` needs deltalake 1.5.0 or later, but 1.4.2 is installed. Upgrade it with `pip install -U 'deltalake>=1.5.0'`.

Only the release numbers are compared, so a pre-release or development build of a supported release (1.6.0rc1, 1.5.0.dev0) passes. A version string that doesn't parse, such as a vendored build's, passes too. This avoids the pre-release problem a parse_version(...) >= parse_version("1.6") check has.

flowchart TD
    subgraph Before
        subgraph BS[Subsystem: API]
            B1["read_delta: import deltalake"] --> B2["read"]
        end
    end
    subgraph After
        subgraph AS[Subsystem: API]
            A1["read_delta: import deltalake"] --> A3["check_deltalake_version (>= 1.5.0)"] --> A2["read"]
        end
    end
    classDef added fill:#c8e6c9,stroke:#2e7d32,color:#000
    class A3 added
Loading

Subsystems

API (read_api.read_delta); the check lives in formats/delta/delta_datasource_v2.py.

Not a duplicate

No open PR adds a deltalake version check; the search for open Delta PRs only finds the Delta DataSourceV2 stack this builds on.

Testing

Local: pyenv with deltalake 1.5.0 and pyarrow 23.

  • pytest python/ray/data/tests/datasource/test_delta.py: 66 passed. The new test_delta_read_checks_the_deltalake_version fakes deltalake.__version__: 0.25.5 and 1.4.2 raise; 1.5.0 and 1.6.0rc1 read the table. Without the check, the two raising cases fail.
  • pre-commit passes; pyrefly as CI runs it (with deltalake and pyarrow resolved) reports no errors in the changed files.

AI assistance was used (Claude Code); every line has been reviewed by the submitter.

🤖 Generated with Claude Code

@abhishekverma-ray
abhishekverma-ray changed the base branch from abhishek/delta-dsv2-8-v2-checkpoint to master November 24, 2026 08:43
@abhishekverma-ray
abhishekverma-ray removed this pull request from stack #68509 November 24, 2026 08:43
@abhishekverma-ray
abhishekverma-ray changed the base branch from master to abhishek/delta-dsv2-8-v2-checkpoint November 24, 2026 08:44
@abhishekverma-ray
abhishekverma-ray force-pushed the abhishek/delta-dsv2-8-v2-checkpoint branch from 06914fc to c7b77b6 Compare November 25, 2026 02:54
@abhishekverma-ray
abhishekverma-ray force-pushed the abhishek/delta-features-1-min-version branch from d1c0572 to 38f3321 Compare November 25, 2026 02:54
Ray declares no deltalake dependency, and an older deltalake failed deep
inside the reader (deltalake 0.x returns PyArrow tables and has a different
API). read_delta now checks the installed release right after importing it
and raises ImportError naming the minimum, 1.5.0, the version CI tests.

Only the release numbers are compared, so a pre-release or development build
of a supported release (1.6.0rc1) passes. A version string that doesn't
parse passes too, rather than blocking a vendored build.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Abhishek Verma <[email protected]>
@abhishekverma-ray
abhishekverma-ray force-pushed the abhishek/delta-dsv2-8-v2-checkpoint branch from c7b77b6 to df99b8d Compare November 26, 2026 03:34
@abhishekverma-ray
abhishekverma-ray force-pushed the abhishek/delta-features-1-min-version branch from 38f3321 to 198fec0 Compare November 26, 2026 03:34

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant