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

fix(bucket transform): bad comparison for truthy value #187

Merged

Conversation

jayceslesar
Copy link
Contributor

@jayceslesar jayceslesar commented Dec 6, 2023

This was a bad comparison due to comparing the truthy value of arbitrary objects. This failed in the case where v is equal to 0, as the truthy value of 0 is False.

I have added a test that was failing before the change I made, and passes after the change was made.

Resolves #173

@jayceslesar
Copy link
Contributor Author

jeez also noticed that the time transforms could use some love. I did some very similar work in a project involving time series data so will take a stab at making that more maintainable

Copy link
Contributor

@Fokko Fokko 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 @jayceslesar for fixing this 🙌 Feel free to raise more PRs if you think it is an improvement :)

@Fokko Fokko merged commit 8b9bc1b into apache:main Dec 6, 2023
6 checks passed
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.

BUG: bucket transform on integer 0 return NAN
2 participants