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

BUG: bucket transform on integer 0 return NAN #173

Closed
puchengy opened this issue Dec 1, 2023 · 3 comments · Fixed by #187
Closed

BUG: bucket transform on integer 0 return NAN #173

puchengy opened this issue Dec 1, 2023 · 3 comments · Fixed by #187

Comments

@puchengy
Copy link
Contributor

puchengy commented Dec 1, 2023

Apache Iceberg version

0.5.0 (latest release)

Please describe the bug 🐞

puchengy@f36f5a4

FAILED                    [  8%]
tests/test_transforms.py:134 (test_buckets[<lambda>-0-0])
None != 0
@Fokko
Copy link
Contributor

Fokko commented Dec 4, 2023

@puchengy This is a big one, thanks for catching it! Are you interested in filing a PR?

@puchengy
Copy link
Contributor Author

puchengy commented Dec 4, 2023

@Fokko Hi, unfortunately I don't have bandwidth recently, will leave it open for now in case anyone is interested.

@jayceslesar
Copy link
Contributor

Looks like the error is just a bad truthy comparison on v, which evaluates False if it is 0, resulting in the None return? https://github.com/apache/iceberg-python/blob/main/pyiceberg/transforms.py#L265

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 a pull request may close this issue.

3 participants