Uh oh!
There was an error while loading. Please reload this page.
GH-41353: [C++] Define bit_width and byte_width of ExtensionType in terms of the storage type - #41354
Conversation
Does this work ok for non-fixed width storage types? |
They will continue to return And I didn't make them final, so if a |
After merging your PR, Conbench analyzed the 7 benchmarking runs that have been run so far on merge-commit fb7e468. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 26 possible false positives for unstable benchmarks that are known to sometimes produce them. |
…e in terms of the storage type (apache#41354) ### Rationale for this change Users and other classes within Arrow itself (e.g. array builders) expect extension types to behave like their underlying storage type. As it is now, `ExtensionType::bit_width()` is the default `DataType::bit_width()` implementation which returns `-1`. It should return the storage type's bit-width. ### What changes are included in this PR? Definition of `ExtensionType::bit_width/byte_width` functions. ### Are these changes tested? Tests added and confirmed to fail prior to these changes. ### Are there any user-facing changes? `ExtensionType` now define `bit_width` and `byte_width` according to their storage type. * GitHub Issue: apache#41353 Authored-by: Felipe Oliveira Carvalho <felipekde@gmail.com> Signed-off-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
…erms of the storage type (#41354) ### Rationale for this change Users and other classes within Arrow itself (e.g. array builders) expect extension types to behave like their underlying storage type. As it is now, `ExtensionType::bit_width()` is the default `DataType::bit_width()` implementation which returns `-1`. It should return the storage type's bit-width. ### What changes are included in this PR? Definition of `ExtensionType::bit_width/byte_width` functions. ### Are these changes tested? Tests added and confirmed to fail prior to these changes. ### Are there any user-facing changes? `ExtensionType` now define `bit_width` and `byte_width` according to their storage type. * GitHub Issue: #41353 Authored-by: Felipe Oliveira Carvalho <felipekde@gmail.com> Signed-off-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
…e in terms of the storage type (apache#41354) ### Rationale for this change Users and other classes within Arrow itself (e.g. array builders) expect extension types to behave like their underlying storage type. As it is now, `ExtensionType::bit_width()` is the default `DataType::bit_width()` implementation which returns `-1`. It should return the storage type's bit-width. ### What changes are included in this PR? Definition of `ExtensionType::bit_width/byte_width` functions. ### Are these changes tested? Tests added and confirmed to fail prior to these changes. ### Are there any user-facing changes? `ExtensionType` now define `bit_width` and `byte_width` according to their storage type. * GitHub Issue: apache#41353 Authored-by: Felipe Oliveira Carvalho <felipekde@gmail.com> Signed-off-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
Rationale for this change
Users and other classes within Arrow itself (e.g. array builders) expect extension types to behave like their underlying storage type.
As it is now,
ExtensionType::bit_width()is the defaultDataType::bit_width()implementation which returns-1. It should return the storage type's bit-width.What changes are included in this PR?
Definition of
ExtensionType::bit_width/byte_widthfunctions.Are these changes tested?
Tests added and confirmed to fail prior to these changes.
Are there any user-facing changes?
ExtensionTypenow definebit_widthandbyte_widthaccording to their storage type.