-
Notifications
You must be signed in to change notification settings - Fork 161
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 rpad and lpad expressions #2157
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work so far! Biggest items of feedback are just in properly working with string characters instead of bytes.
44bb4c6
to
e5df935
Compare
@kevinzwang addressed the feedback. |
@murex971 the tests are failing because the function Also pinging @jaychia because he made that change |
I believe the functionality of |
Yes! We made it cleaner and easier to have Feel free to check out the other kernels for usage! |
@jaychia
In the case of cc: @kevinzwang |
340b3e8
to
a355ef3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for the delay. Happy to see these improvements to the code, and its awesome that you were also able to add lpad!
Overall, the code looks good to go, just a few small comments and suggestions. Make sure to also take a look at some of the unresolved comments from the previous review. Great work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll go ahead and approve it, should be ready to merge once these final things are resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to go! Just one comment about the refactored pad function
src/daft-core/src/array/ops/utf8.rs
Outdated
Ok(match placement { | ||
PadPlacement::Left => fillchar.chain(val.chars()).collect(), | ||
PadPlacement::Right => val.chars().chain(fillchar).collect(), | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nit: I would recommend trying to do this match outside of the iteration so that we don't have an extra branching statement in the hot path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
Amazing, I'll merge it in! |
Resolves #1931
Resolves #1930