Skip to content

[C++][Compute] Tighten coalesce exact dispatch for parameterized varargs#76

Draft
zanmato1984 wants to merge 1 commit into
mainfrom
codex/coalesce-exact-dispatch-decimal
Draft

[C++][Compute] Tighten coalesce exact dispatch for parameterized varargs#76
zanmato1984 wants to merge 1 commit into
mainfrom
codex/coalesce-exact-dispatch-decimal

Conversation

@zanmato1984

Copy link
Copy Markdown
Owner

Summary

  • tighten coalesce exact dispatch for parameterized decimal varargs so mixed decimal precisions/scales fall through to DispatchBest during expression binding
  • keep decimal rescaling in the existing DispatchBest path
  • add direct dispatch and expression-binding regressions for mixed decimal coalesce inputs

Root cause

Expression binding tries DispatchExact before DispatchBest. coalesce registered decimal varargs kernels with a broad InputType(Type::DECIMAL128/256) signature, so mixed parameterized decimals like decimal128(3,2) and decimal128(4,3) matched exactly during binding. That bypassed the decimal normalization in DispatchBest, leaving the bound expression without the implicit cast needed to a common decimal type.

What changed

  • add a decimal-only exact-match constraint for coalesce varargs kernels so exact dispatch requires identical parameterized decimal types
  • apply that constraint to the decimal128 and decimal256 coalesce kernel registrations only
  • add regression coverage for both DispatchBest/DispatchExact and expression binding

Testing

  • debug/arrow-compute-expression-test --gtest_filter=Expression.BindWithImplicitCastsForCoalesceOnDecimal
  • debug/arrow-compute-scalar-if-else-test --gtest_filter=TestCoalesce.DispatchBest:TestCoalesce.DispatchExact

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.

1 participant