GH-00000: [C++][Compute] Tighten case_when exact dispatch#80
Draft
zanmato1984 wants to merge 1 commit into
Draft
GH-00000: [C++][Compute] Tighten case_when exact dispatch#80zanmato1984 wants to merge 1 commit into
zanmato1984 wants to merge 1 commit into
Conversation
|
❌ GitHub issue #00000 could not be retrieved. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
case_whenexact dispatch was too permissive for varargs kernels whose value arguments were registered by type id only.This branch adds targeted reproducer coverage for mismatched parameterized value arguments and tightens the exact-dispatch match constraint so
DispatchExactonly accepts identical value types.DispatchBeststill rewrites values to a common type first when coercion is intended.Reproduced failure
Yes.
Before this patch, the new
DispatchExactFailsprobes incorrectly succeeded for mismatched:fixed_size_binarywidthslist/fixed_size_listchild shapesstructfield typesRoot cause
case_whenvarargs kernels were registered with signatures based on value type id only. Decimal kernels had a special exact-match constraint, but other parameterized value types did not, soDispatchExacttreated distinct parameterized types with the same type id as interchangeable.Fix
Apply a shared exact-match constraint to
case_whenvalue args so all varargs exact dispatches require the same concrete value type.Tests
TestCaseWhen.DispatchExactwith targeted exact-match coverage for matching and mismatched parameterized value args./debug/arrow-compute-scalar-if-else-test '--gtest_filter=TestCaseWhen.*'