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 floor division #3064

Merged
merged 3 commits into from
Oct 26, 2024
Merged

Conversation

ConeyLiu
Copy link
Contributor

Close #2418

@ConeyLiu ConeyLiu changed the title [FEAG] Add floor division [FEAT] Add floor division Oct 17, 2024
@github-actions github-actions bot added the enhancement New feature or request label Oct 17, 2024
Copy link

codspeed-hq bot commented Oct 17, 2024

CodSpeed Performance Report

Merging #3064 will not alter performance

Comparing ConeyLiu:floor_division (19db692) with main (c69ee3f)

Summary

✅ 17 untouched benchmarks

@samster25 samster25 requested a review from colin-ho October 17, 2024 19:49
@samster25
Copy link
Member

assigning @colin-ho for review

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.

Great first implementation @ConeyLiu ! Left some comments regarding performance and testing.

tests/series/test_arithmetic.py Outdated Show resolved Hide resolved
src/daft-core/src/series/ops/arithmetic.rs Show resolved Hide resolved
expr = Expression._to_expression(other)
return Expression._from_pyexpr(self._expr // expr._expr)

def __rfloordiv__(self, other: object) -> Expression:
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this used / tested anywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This follows the __truediv__ and __rtruediv__. Currently only used in UT.

@ConeyLiu
Copy link
Contributor Author

Thanks @colin-ho for your reviews. Let me address your comments later.

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.

Looks good, thanks @ConeyLiu !

@colin-ho colin-ho merged commit 915467b into Eventual-Inc:main Oct 26, 2024
38 checks passed
@ConeyLiu
Copy link
Contributor Author

Thanks @colin-ho

@ConeyLiu ConeyLiu deleted the floor_division branch October 28, 2024 01:50
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.

Floor/integer division
3 participants