Skip to content

Conversation

@zanmato1984
Copy link
Contributor

@zanmato1984 zanmato1984 commented Dec 24, 2025

Rationale for this change

When dispatching binary arithmetic and comparison kernels, we do a special casting ahead for decimal arguments. If one argument is decimal and another is the type not castable (e.g., string) to decimal, an assertion fires. On the other hand, we have a graceful way to error on dispatch failure in the general kernel dispatching path after this special casting:

Function 'greater' has no kernel matching input types (string, double)

We want to unify the error path for decimal.

What changes are included in this PR?

Bypass the decimal casting early and not error out if we see the other argument is not castable to decimal, and let the subsequent general kernel dispatching path to handle the error gracefully.

Are these changes tested?

Test included.

Are there any user-facing changes?

None.

@zanmato1984
Copy link
Contributor Author

cc @pitrou

Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

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

LGTM, thank you @zanmato1984

@github-actions github-actions bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Jan 5, 2026
@zanmato1984
Copy link
Contributor Author

Thank you @pitrou for reviewing. I'm merging now.

@zanmato1984 zanmato1984 merged commit deb73a7 into apache:main Jan 5, 2026
44 of 46 checks passed
@zanmato1984 zanmato1984 removed the awaiting committer review Awaiting committer review label Jan 5, 2026
@zanmato1984 zanmato1984 deleted the fix/gh-35957 branch January 5, 2026 09:40
@conbench-apache-arrow
Copy link

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

There weren't enough matching historic benchmark results to make a call on whether there were 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