Skip to content

Fix/date bin ree coercion - #24565

Open
thorfour wants to merge 2 commits into
apache:mainfrom
polarsignals:fix/date-bin-ree-coercion
Open

Fix/date bin ree coercion#24565
thorfour wants to merge 2 commits into
apache:mainfrom
polarsignals:fix/date-bin-ree-coercion

Conversation

@thorfour

Copy link
Copy Markdown

Which issue does this PR close?

Rationale for this change

Adds missing support for coercing REE arrays and extracting range windows from REE arrays.

What changes are included in this PR?

Added case statements for supporting REE arrays

Are these changes tested?

Yes a unit test is included.

Are there any user-facing changes?

No

coerced_from() already special-cases Dictionary(_, value_type) so that
functions declared with the old-style Exact/OneOf signature (which
don't go through the newer Coercible/TypeSignatureClass system) match
against the dictionary's value type. RunEndEncoded had no equivalent
case, so any such function (e.g. date_bin) failed to plan when given a
RunEndEncoded-wrapped column, even though the same column as a plain
Dictionary would have matched fine.

Add the symmetric RunEndEncoded case, unwrapping to the value field's
type before recursing, mirroring the existing Dictionary handling.
extract_window_frame_target_type() already recurses through
Dictionary(_, value_type) to find the natural type for a RANGE window
frame bound, but had no equivalent case for RunEndEncoded, so ordering
a RANGE window by a REE-dict-encoded column (the same column as a plain
Dictionary would work) failed with "Cannot run range queries on
datatype: RunEndEncoded(...)".

Add the symmetric RunEndEncoded case, mirroring the existing Dictionary
handling.
@github-actions github-actions Bot added logical-expr Logical plan and expressions optimizer Optimizer rules labels Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

logical-expr Logical plan and expressions optimizer Optimizer rules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

coerced_from and extract_window_frame_target_type doesn't support RunEndEncoded arrays

1 participant