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

GH-17682: [Format] Add Bool8 Canonical Extension Type #43234

Merged
merged 5 commits into from
Aug 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions docs/source/format/CanonicalExtensions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,28 @@ Examples:

{"type_name": "OTHER", "vendor_name": "JDBC driver name"}

8-bit Boolean
joellubi marked this conversation as resolved.
Show resolved Hide resolved
=============

Bool8 represents a boolean value using 1 byte (8 bits) to store each value instead of only 1 bit as in
the original Arrow Boolean type. Although less compact than the original representation, Bool8 may have
better zero-copy compatibility with various systems that also store booleans using 1 byte.

* Extension name: ``arrow.bool8``.

* The storage type of this extension is ``Int8`` where:
AlenkaF marked this conversation as resolved.
Show resolved Hide resolved

* **false** is denoted by the value ``0``.
* **true** can be specified using any non-zero value. Preferably ``1``.

* Extension type parameters:

This type does not have any parameters.

* Description of the serialization:

Metadata is an empty string.

=========================
Community Extension Types
=========================
Expand Down
Loading