Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH-41353: [C++] Define bit_width and byte_width of ExtensionType in t…
…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>
- Loading branch information