Skip to content

feat: Added Into<DataFrame> trait to JsDataFrame #328

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

inakineitor
Copy link

Pull request associated to issue #327.

napi = { version = "2.16.16", default-features = false, features = [
"napi8",
"serde-json",
napi = { version = "3.0.0-alpha.29", default-features = false, features = [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason you are using alpha version here? This is a stable library, hoping to avoid living on the edge.

@@ -0,0 +1,2 @@
[toolchain]
channel = "nightly-2025-05-05"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to match polars rs-0.47 branch which currently is on nightly-2025-04-19
We also need to use the same nightly for CI/CD.

@Bidek56
Copy link
Collaborator

Bidek56 commented May 7, 2025

5 deprecated warnings:

warning: use of deprecated struct `napi::JsFunction`: Please use `Function` instead
 --> src/file.rs:3:20
  |
3 | use napi::{Either, JsFunction, JsObject};
  |                    ^^^^^^^^^^
  |
  = note: `#[warn(deprecated)]` on by default
warning: use of deprecated struct `napi::JsFunction`: Please use `Function` instead
  --> src/file.rs:50:27
   |
50 |         let stream_write: JsFunction = self.inner.get_named_property("push").unwrap();
   |                           ^^^^^^^^^^
warning: use of deprecated struct `napi::JsFunction`: Please use `Function` instead
  --> src/file.rs:65:27
   |
65 |         let stream_write: JsFunction = self.inner.get_named_property("write").unwrap();
   |                           ^^^^^^^^^^
warning: use of deprecated method `napi::Env::create_buffer_with_data`: Use `BufferSlice::from_data` instead
  --> src/file.rs:51:30
   |
51 |         let bytes = self.env.create_buffer_with_data(buf.to_owned()).unwrap();
   |                              ^^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated method `napi::Env::create_buffer_with_data`: Use `BufferSlice::from_data` instead
  --> src/file.rs:66:30
   |
66 |         let bytes = self.env.create_buffer_with_data(buf.to_owned()).unwrap();

@Bidek56
Copy link
Collaborator

Bidek56 commented May 7, 2025

Tests fail due to: Property 'maintainOrder' does not exist on type 'CsvWriterOptions'.

@inakineitor
Copy link
Author

Hi! Sorry, I did not realized that the commits made after creating the pull request would retroactively affect the PR. This was supposed to contain only the change in the title, and everything else I was gonna make a dedicated issue and PR for.

All the commits after the first are a very early attempt at migrating this library to the latest (0.47) version of polars.

Also, napi-3 is not needed. I was just testing whether their wasm target works, because it would be a fairly quick way of adding non-stable WASM support to the JS polars.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants