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] Add str.left() funtion #2027

Merged
merged 8 commits into from
Mar 21, 2024
Merged

Conversation

murex971
Copy link
Contributor

Returns the left-most n characters

Resolves #1926

Copy link

codecov bot commented Mar 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.71%. Comparing base (c2db062) to head (5382632).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2027      +/-   ##
==========================================
+ Coverage   84.70%   84.71%   +0.01%     
==========================================
  Files          62       62              
  Lines        6768     6779      +11     
==========================================
+ Hits         5733     5743      +10     
- Misses       1035     1036       +1     
Files Coverage Δ
daft/expressions/expressions.py 91.57% <100.00%> (+0.05%) ⬆️
daft/series.py 93.12% <100.00%> (+0.07%) ⬆️

... and 1 file with indirect coverage changes

@samster25 samster25 added the enhancement New feature or request label Mar 20, 2024
@samster25 samster25 requested a review from colin-ho March 20, 2024 19:17
Copy link
Contributor

@colin-ho colin-ho left a comment

Choose a reason for hiding this comment

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

Hey @murex971, aweome work! In addition to the comments I left, could you also add a test in tests/table/utf8 similar to this one https://github.com/Eventual-Inc/Daft/blob/main/tests/table/utf8/test_match.py. Thanks :)

tests/series/test_utf8_ops.py Outdated Show resolved Hide resolved
src/daft-dsl/src/functions/utf8/left.rs Outdated Show resolved Hide resolved
src/daft-core/src/series/ops/utf8.rs Outdated Show resolved Hide resolved
src/daft-core/src/array/ops/utf8.rs Outdated Show resolved Hide resolved
@murex971
Copy link
Contributor Author

@colin-ho pushed the changes.

@murex971
Copy link
Contributor Author

@colin-ho thanks for the review. Addressed.

@colin-ho colin-ho merged commit e96266d into Eventual-Inc:main Mar 21, 2024
29 checks passed
@colin-ho
Copy link
Contributor

@colin-ho thanks for the review. Addressed.

Awesome, thanks!

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