Fix/date bin ree coercion - #24565
Open
thorfour wants to merge 2 commits into
Open
Conversation
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.
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.
Which issue does this PR close?
coerced_fromandextract_window_frame_target_typedoesn't support RunEndEncoded arrays #24564.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