GH-41389: [Python] Expose byte_width and bit_width of ExtensionType in terms of the storage type
Rationale for this change
This update aligns the Python API with Arrow C++ by exposing the actual byte and bit widths of extension types from their storage type.
What changes are included in this PR?
- Expose byte_width and bit_width properties for ExtensionType in Python, reflecting the underlying storage type.
- Add unit tests to verify these properties
Are these changes tested?
Yes
Are there any user-facing changes?
Yes
- GitHub Issue: #41389
I'll merge this in a few days if nobody objects this.
@jorisvandenbossche Hello. Would you take a look at this PR when you get a chance? Thanks!
Could you rebase on main to fix CI failures?
I'll merge this in the next week if nobody objects this.
Hello @kou! Will this PR need more time before it can be merged?
Thank you as always!
@jorisvandenbossche Fine! I applied your suggestions and fixed the unit test.
Thank you for review :)
After merging your PR, Conbench analyzed the 7 benchmarking runs that have been run so far on merge-commit e254c43c095bd6e33d07129257e11760f885f299.
There were no benchmark performance regressions. 🎉
The full Conbench report has more details. It also includes information about 5 possible false positives for unstable benchmarks that are known to sometimes produce them.