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

Polars compilation fails after adding extract_jsonpath #14008

Closed
2 tasks done
lkarthee opened this issue Jan 26, 2024 · 3 comments
Closed
2 tasks done

Polars compilation fails after adding extract_jsonpath #14008

lkarthee opened this issue Jan 26, 2024 · 3 comments
Labels
bug Something isn't working needs triage Awaiting prioritization by a maintainer rust Related to Rust Polars

Comments

@lkarthee
Copy link

Checks

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of Polars.

Reproducible example

[package]
name = "polar_test"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
polars = { version = "0.36.2", features = ["lazy", "extract_jsonpath"] }

Log output

13:08 $ cargo run
   Compiling simdutf8 v0.1.4
   Compiling serde v1.0.195
   Compiling serde_derive v1.0.195
   Compiling lexical-util v0.8.5
   Compiling polars-arrow v0.36.2
   Compiling serde_json v1.0.111
   Compiling hashbrown v0.13.2
   Compiling ref-cast v1.0.22
   Compiling ref-cast-impl v1.0.22
   Compiling float-cmp v0.9.0
   Compiling polars-core v0.36.2
   Compiling polars-error v0.36.2
   Compiling polars-utils v0.36.2
   Compiling polars-ops v0.36.2
   Compiling fallible-streaming-iterator v0.1.9
   Compiling log v0.4.20
   Compiling lexical-write-integer v0.8.5
   Compiling lexical-parse-integer v0.8.6
   Compiling polars-plan v0.36.2
   Compiling lexical-parse-float v0.8.5
   Compiling lexical-write-float v0.8.5
   Compiling lexical-core v0.8.5
   Compiling polars-lazy v0.36.2
   Compiling polars v0.36.2
   Compiling polars-compute v0.36.2
   Compiling polars-row v0.36.2
   Compiling halfbrown v0.2.4
   Compiling value-trait v0.8.1
   Compiling simd-json v0.13.8
   Compiling jsonpath_lib v0.3.0
   Compiling polars-json v0.36.2
error[E0432]: unresolved import `jsonpath_lib::PathCompiled`
 --> /Users/kartheek/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-ops-0.36.2/src/chunked_array/strings/json_path.rs:4:5
  |
4 | use jsonpath_lib::PathCompiled;
  |     ^^^^^^^^^^^^^^------------
  |     |             |
  |     |             help: a similar name exists in the module: `Compiled`
  |     no `PathCompiled` in the root

For more information about this error, try `rustc --explain E0432`.
error: could not compile `polars-ops` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...
    Building [======================>  ] 155/162: polars-core

Issue description

Unable to compile when "extract_jsonpath" feature is added. PyPolars and nodes-polars use same features, and yet they compile ?

Expected behavior

compilation succeeds

Installed versions

13:23 $ rustc --version
rustc 1.77.0-nightly (d6d7a9386 2023-12-22)

@lkarthee lkarthee added bug Something isn't working needs triage Awaiting prioritization by a maintainer rust Related to Rust Polars labels Jan 26, 2024
@ritchie46
Copy link
Member

This is not supported in Rust. We have a patched version on the python side.

@lkarthee
Copy link
Author

As a workaround, can I use this ?

[patch.crates-io]
jsonpath_lib = { version = "0.3", optional = true, git = "https://github.com/ritchie46/jsonpath", branch = "improve_compiled" }

@ritchie46
Copy link
Member

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Awaiting prioritization by a maintainer rust Related to Rust Polars
Projects
None yet
Development

No branches or pull requests

2 participants