Skip to content

GH-37027: [C++] Add float16 kernels to if-else and vector-replace functions - #46446

Merged
pitrou merged 4 commits into
apache:mainfrom
colin-r-schultz:halffloat-type-agnostic-primitive
Jun 30, 2025
Merged

pitrou merged 4 commits into
apache:mainfrom
colin-r-schultz:halffloat-type-agnostic-primitive

Conversation

@colin-r-schultz

@colin-r-schultz colin-r-schultz commented May 14, 2025 •

Copy link
Copy Markdown
Contributor

Rationale for this change

Support float16/halffloat type in some functions which are agnostic to the numeric value.

What changes are included in this PR?

  • Added a case to GenerateTypeAgnosticPrimitive for HALF_FLOAT
  • Added float16 kernels for if_else, case_when, coalesce, and choose
  • Added float16 kernels for replace_with_mask, fill_null_forward, fill_null_backward
  • Add HalfFloatType to the list of types tested for the above functions

Are these changes tested?

Yes

Are there any user-facing changes?

Functions listed above now support float16

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #37027 has been automatically assigned in GitHub to PR creator.

@pitrou

pitrou commented Jun 12, 2025

Copy link
Copy Markdown
Member

@colin-r-schultz Is this ready for review?

@colin-r-schultz

Copy link
Copy Markdown
Contributor Author

@pitrou Yes!

@pitrou
pitrou force-pushed the halffloat-type-agnostic-primitive branch from 28a77b8 to 7e37931 Compare June 30, 2025 15:00

@pitrou pitrou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay @colin-r-schultz . This looks good to me, thanks a lot for your contribution!

@pitrou

pitrou commented Jun 30, 2025

Copy link
Copy Markdown
Member

I rebased from git main, I'll merge if CI passes.

@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 84d9c88.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants