Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeltaLake integration not working (Python) #14842

Open
riziles opened this issue Feb 23, 2025 · 4 comments
Open

DeltaLake integration not working (Python) #14842

riziles opened this issue Feb 23, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@riziles
Copy link

riziles commented Feb 23, 2025

Describe the bug

After upgrading to deltalake (Python) 0.25.1, this basic example fails. Was working fine before.

from deltalake import DeltaTable, write_deltalake
import pyarrow as pa
from datafusion import SessionContext

arrow_tbl = pa.Table.from_pydict({"x": [1, 2], "y": [2.0, 4.0]})

write_deltalake("./test/scratch", arrow_tbl, mode="overwrite")

dt = DeltaTable("./test/scratch")

ctx = SessionContext()

ctx.register_table_provider("tbl", dt)

print(ctx.table("tbl"))

To Reproduce

No response

Expected behavior

No response

Additional context

No response

@riziles riziles added the bug Something isn't working label Feb 23, 2025
@riziles
Copy link
Author

riziles commented Feb 23, 2025

cross posted here: delta-io/delta-rs#3221

@ion-elgreco
Copy link

What error are you seeing?

@riziles
Copy link
Author

riziles commented Feb 23, 2025

Nothing. It just silently crashes on the register_table_provider step. Can't debug or anything. Never seen that in Python before.

@mag1cfrog
Copy link

not sure really relevant, but I'm also having some compilation issue when trying to use deltalake with datafusion in Rust.

Here's what I get:

   Compiling datafusion v44.0.0
   Compiling datafusion-proto v44.0.0
   Compiling deltalake-core v0.24.0
error[E0308]: mismatched types
   --> /home/hanbo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/deltalake-core-0.24.0/src/kernel/models/actions.rs:567:9
    |
566 |     fn try_from(value: &TableFeatures) -> Result<Self, Self::Error> {
    |                                           ------------------------- expected `Result<ReaderFeatures, strum::ParseError>` because of return type
567 |         ReaderFeatures::try_from(value.as_ref())
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `strum::ParseError`, found a different `strum::ParseError`
    |
    = note: `strum::ParseError` and `strum::ParseError` have similar names, but are actually distinct types
note: `strum::ParseError` is defined in crate `strum`
   --> /home/hanbo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strum-0.26.3/src/lib.rs:42:1
    |
42  | pub enum ParseError {
    | ^^^^^^^^^^^^^^^^^^^
note: `strum::ParseError` is defined in crate `strum`
   --> /home/hanbo/.cargo/git/checkouts/strum-222d21164b266718/cc240c3/strum/src/lib.rs:42:1
    |
42  | pub enum ParseError {
    | ^^^^^^^^^^^^^^^^^^^
    = note: perhaps two different versions of crate `strum` are being used?

error[E0308]: mismatched types
   --> /home/hanbo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/deltalake-core-0.24.0/src/kernel/models/actions.rs:575:9
    |
574 |     fn try_from(value: &TableFeatures) -> Result<Self, Self::Error> {
    |                                           ------------------------- expected `Result<WriterFeatures, strum::ParseError>` because of return type
575 |         WriterFeatures::try_from(value.as_ref())
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `strum::ParseError`, found a different `strum::ParseError`
    |
    = note: `strum::ParseError` and `strum::ParseError` have similar names, but are actually distinct types
note: `strum::ParseError` is defined in crate `strum`
   --> /home/hanbo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strum-0.26.3/src/lib.rs:42:1
    |
42  | pub enum ParseError {
    | ^^^^^^^^^^^^^^^^^^^
note: `strum::ParseError` is defined in crate `strum`
   --> /home/hanbo/.cargo/git/checkouts/strum-222d21164b266718/cc240c3/strum/src/lib.rs:42:1
    |
42  | pub enum ParseError {
    | ^^^^^^^^^^^^^^^^^^^
    = note: perhaps two different versions of crate `strum` are being used?

For more information about this error, try `rustc --explain E0308`.
error: could not compile `deltalake-core` (lib) due to 2 previous errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants