-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
GH-39277: [Python] Fix missing byte_width attribute on DataType class #39592
GH-39277: [Python] Fix missing byte_width attribute on DataType class #39592
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.
+1
d80c403
to
5da332c
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.
Thanks for the update @kevinmingtarja . This LGTM, I'll merge if CI passes successfully.
… class (apache#39592) ### Rationale for this change As mentioned in the issue, the byte_width attribute was missing on most data types, which is a small annoyance. ### What changes are included in this PR? Add the byte_width attribute on the DataType class (which is the base class of all Arrow data types), instead of on FixedSizeBinaryType (which is a child class of DataType). ### Are these changes tested? Yes, tests were added in `python/pyarrow/tests/test_types.py`. ### Are there any user-facing changes? Yes, users can now access the byte_width attribute on all fixed width data types. * Closes: apache#39277 Authored-by: Kevin Mingtarja <kevin.mingtarja@gmail.com> Signed-off-by: Antoine Pitrou <antoine@python.org>
After merging your PR, Conbench analyzed the 7 benchmarking runs that have been run so far on merge-commit 655ae96. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 7 possible false positives for unstable benchmarks that are known to sometimes produce them. |
#40381) ### Rationale for this change Fixing the hypothesis tests: - fixup untested changes to the strategies from #40160 - fix a bug in the `byte_width` attribute discovered by hypothesis (introduced by #39592) * GitHub Issue: #40379 Authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com> Signed-off-by: Antoine Pitrou <antoine@python.org>
… class (apache#39592) ### Rationale for this change As mentioned in the issue, the byte_width attribute was missing on most data types, which is a small annoyance. ### What changes are included in this PR? Add the byte_width attribute on the DataType class (which is the base class of all Arrow data types), instead of on FixedSizeBinaryType (which is a child class of DataType). ### Are these changes tested? Yes, tests were added in `python/pyarrow/tests/test_types.py`. ### Are there any user-facing changes? Yes, users can now access the byte_width attribute on all fixed width data types. * Closes: apache#39277 Authored-by: Kevin Mingtarja <kevin.mingtarja@gmail.com> Signed-off-by: Antoine Pitrou <antoine@python.org>
…s tests (apache#40381) ### Rationale for this change Fixing the hypothesis tests: - fixup untested changes to the strategies from apache#40160 - fix a bug in the `byte_width` attribute discovered by hypothesis (introduced by apache#39592) * GitHub Issue: apache#40379 Authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com> Signed-off-by: Antoine Pitrou <antoine@python.org>
Rationale for this change
As mentioned in the issue, the byte_width attribute was missing on most data types, which is a small annoyance.
What changes are included in this PR?
Add the byte_width attribute on the DataType class (which is the base class of all Arrow data types), instead of on FixedSizeBinaryType (which is a child class of DataType).
Are these changes tested?
Yes, tests were added in
python/pyarrow/tests/test_types.py
.Are there any user-facing changes?
Yes, users can now access the byte_width attribute on all fixed width data types.