Skip to content

[C++] coalesce expressions fail for mixed dictionary types #55404

Closed

Description

@zanmato1984

Describe the bug, including details regarding any error messages, version, and platform.

A bound coalesce expression fails at execution when dictionary arguments have compatible value types but differ in index type, value type, or the ordered flag.

For example, consider coalesce(x, y) with these dictionary-encoded inputs:

x: dictionary<values=int32, indices=int8, ordered=0>
   values: [10, null, 30, null, null]
y: dictionary<values=int32, indices=int16, ordered=0>
   values: [null, 20, 40, null, null]

Expression binding succeeds, but execution returns:

Type error: All types must be compatible,
expected: dictionary<values=int32, indices=int8, ordered=0>,
but got: dictionary<values=int32, indices=int16, ordered=0>

The dictionary kernel matches these arguments during exact dispatch without checking full type equality. This prevents expression binding from falling back to best dispatch and inserting the necessary casts, although the kernel requires identical types at execution.

The expected result is an int32 array containing [10, 20, 30, null, null]. Compatible mixed dictionary arguments should follow the existing decoding and type-promotion path. Arguments with identical dictionary types should retain dictionary-encoded execution.

Component(s)

C++

Activity

  1. added a commit that references this issue on Nov 10, 2026
  2. added this to the 27.0.0 milestone on Nov 10, 2026
  3. zanmato1984 commented on Nov 10, 2026

    @zanmato1984
    ContributorAuthor

    Issue resolved by pull request 55405
    #55405

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions