Skip to content

Add support for cast from BOOLEAN to NUMBER#28879

Merged
findepi merged 1 commit intotrinodb:masterfrom
findepi:findepi/add-support-for-cast-from-boolean-to-number-2f7b4b
Mar 27, 2026
Merged

Add support for cast from BOOLEAN to NUMBER#28879
findepi merged 1 commit intotrinodb:masterfrom
findepi:findepi/add-support-for-cast-from-boolean-to-number-2f7b4b

Conversation

@findepi
Copy link
Copy Markdown
Member

@findepi findepi commented Mar 26, 2026

Implements cast operator to convert BOOLEAN to NUMBER:

  • true is converted to NUMBER 1
  • false is converted to NUMBER 0

This follows the same pattern as existing casts from BOOLEAN to other numeric types (BIGINT, INTEGER, DOUBLE, etc).

release notes

General
* Support casting BOOLEAN to NUMBER.

Implements cast operator to convert BOOLEAN to NUMBER:
- true is converted to NUMBER 1
- false is converted to NUMBER 0

This follows the same pattern as existing casts from BOOLEAN to
other numeric types (BIGINT, INTEGER, DOUBLE, etc).
@findepi findepi requested review from losipiuk, martint and wendigo March 26, 2026 11:28
@cla-bot cla-bot bot added the cla-signed label Mar 26, 2026
@findepi findepi merged commit 7f7427f into trinodb:master Mar 27, 2026
99 checks passed
@findepi findepi deleted the findepi/add-support-for-cast-from-boolean-to-number-2f7b4b branch March 27, 2026 10:49
@github-actions github-actions bot added this to the 481 milestone Mar 27, 2026
@ebyhr ebyhr mentioned this pull request Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants