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

Added case() function #770

Merged
merged 11 commits into from
Jan 3, 2025
Merged

Added case() function #770

merged 11 commits into from
Jan 3, 2025

Conversation

ilongin
Copy link
Contributor

@ilongin ilongin commented Jan 2, 2025

Adding case() function.
Example:

  dc.mutate(
      res=func.case((C("num") > 0, "P"), (C("num") < 0, "N"), else_="Z"),
  )

Copy link

cloudflare-workers-and-pages bot commented Jan 2, 2025

Deploying datachain-documentation with  Cloudflare Pages  Cloudflare Pages

Latest commit: 958d2bb
Status: ✅  Deploy successful!
Preview URL: https://388be9f0.datachain-documentation.pages.dev
Branch Preview URL: https://ilongin-769-case-function.datachain-documentation.pages.dev

View logs

@ilongin ilongin linked an issue Jan 2, 2025 that may be closed by this pull request
@amritghimire
Copy link
Contributor

Looks like test cases are failing

Copy link

codecov bot commented Jan 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.33%. Comparing base (eb22c85) to head (958d2bb).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #770      +/-   ##
==========================================
- Coverage   87.33%   87.33%   -0.01%     
==========================================
  Files         116      116              
  Lines       11130    11145      +15     
  Branches     1528     1532       +4     
==========================================
+ Hits         9720     9733      +13     
- Misses       1031     1032       +1     
- Partials      379      380       +1     
Flag Coverage Δ
datachain 87.26% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@ilongin ilongin merged commit 8dfa4ff into main Jan 3, 2025
34 checks passed
@ilongin ilongin deleted the ilongin/769-case-function branch January 3, 2025 13:11
@dmpetrov dmpetrov mentioned this pull request Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add case() function
2 participants