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

feat: JSON encoding in the root expression namespace pl.Expr.json_encode #18396

Closed

Conversation

tim-stephenson
Copy link
Contributor

Adding json_encode to the root expression & series namespace. This maps a column of any polars type (besides the object type) into a string column with it's corresponding JSON encoding.

Prior PR which only added it to the list namespace:

Issues asking for this feature:

Current PR adding the ignore_nulls option to json_encode. I added (but did not yet implement) this option to the json_encode function I added.

@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars labels Aug 27, 2024
Copy link

codecov bot commented Aug 27, 2024

Codecov Report

Attention: Patch coverage is 84.84848% with 5 lines in your changes missing coverage. Please review.

Project coverage is 79.80%. Comparing base (dd1fc86) to head (eaf6dee).
Report is 57 commits behind head on main.

Files with missing lines Patch % Lines
crates/polars-plan/src/dsl/function_expr/mod.rs 33.33% 2 Missing ⚠️
...ates/polars-plan/src/dsl/function_expr/dispatch.rs 92.30% 1 Missing ⚠️
.../polars-python/src/lazyframe/visitor/expr_nodes.rs 0.00% 1 Missing ⚠️
py-polars/polars/expr/struct.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18396      +/-   ##
==========================================
- Coverage   79.84%   79.80%   -0.04%     
==========================================
  Files        1496     1497       +1     
  Lines      200333   200407      +74     
  Branches     2841     2843       +2     
==========================================
- Hits       159952   159938      -14     
- Misses      39856    39944      +88     
  Partials      525      525              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ritchie46
Copy link
Member

@tim-stephenson will this be finished? Otherwise we must close it because of the clutter.

@ritchie46 ritchie46 added the closing-candidate PR's/issue candidate for closing label Sep 23, 2024
@ritchie46 ritchie46 closed this Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closing-candidate PR's/issue candidate for closing enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants