Skip to content

Introduce Bool Type#492

Open
IyeOnline wants to merge 2 commits intoClickHouse:masterfrom
IyeOnline:topic/bool-type
Open

Introduce Bool Type#492
IyeOnline wants to merge 2 commits intoClickHouse:masterfrom
IyeOnline:topic/bool-type

Conversation

@IyeOnline
Copy link
Copy Markdown
Contributor

@IyeOnline IyeOnline commented Apr 29, 2026

Previously the library implicitly converted bool columns to Uint8,
loosing type information.

This commit introduces a "strong type" for Bool that is distinct from
bool. This allows complete re-use of ColumnVector without triggering
the std::vector<bool> specialization.

This new type is guarded behind a CMake variable/preprocessor define
CH_MAP_BOOL_TO_UINT8, which is enabled by default in order to keep
compatibility for library users. In the future the default should be
switched first and the variable then removed later.

Previously the library implicitly converted bool columns to `Uint8`,
loosing type information.

This commit introduces a "strong type" for `Bool` that is distinct from
`bool`. This allows complete re-use of `ColumnVector` without triggering
the `std::vector<bool>` specialization.

This new type is guarded behind a CMake variable/preprocessor define
`CH_MAP_BOOL_TO_UINT8`, which is enabled by default in order to keep
compatibility for library users. In the future the default should be
switched first and the variable then removed later.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Bool type support (distinct from UInt8)

1 participant