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

Upgrading to rs-0.46 #309

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

Upgrading to rs-0.46 #309

wants to merge 10 commits into from

Conversation

Bidek56
Copy link
Collaborator

@Bidek56 Bidek56 commented Feb 14, 2025

Upgrading:

  • Pola.rs -> 0.46.0
  • toolchain -> nightly-2025-01-05
  • Yarn -> 4.7.0
  • TS -> 5.8.2

Serialization has been changed in core RS by this PR
Adding new to_json func due to the serialization change in core RS.

@Bidek56 Bidek56 marked this pull request as ready for review February 21, 2025 15:47
@Bidek56 Bidek56 self-assigned this Feb 23, 2025
@Bidek56 Bidek56 added the enhancement New feature or request label Feb 23, 2025
Comment on lines +2539 to +2540
toJSON() {
return _df.toJson().toString();
Copy link
Collaborator

Choose a reason for hiding this comment

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

if we don't support serialization anymore, I'd rather remove this method, along with the other serialization based ones toObject,

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We do support serialization using Ipc format.
Since this is JS, I figured we need Json support.

Copy link
Collaborator

Choose a reason for hiding this comment

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

at a minimum, The toJSON/ JSON.stringify should use a columnar representation, not the row oriented. It also needs to work with JSON.stringify.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

toJSON and JSON.stringify(df) produce valid JSON: "[{\"foo\":1.0,\"bar\":\"a\"},{\"foo\":2.0,\"bar\":\"b\"},{\"foo\":3.0,\"bar\":\"c\"}]" which matches df.writeJSON(..)
What would a valid JSON column representation look like?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants