Support concatenation of mixed FixedSizeBinary via concat_elements_dyn#10222
Open
pepijnve wants to merge 4 commits into
Open
Support concatenation of mixed FixedSizeBinary via concat_elements_dyn#10222pepijnve wants to merge 4 commits into
concat_elements_dyn#10222pepijnve wants to merge 4 commits into
Conversation
Jefffrey
approved these changes
Jun 27, 2026
Comment on lines
+874
to
+877
| assert_eq!( | ||
| output.as_any().downcast_ref::<BinaryViewArray>().unwrap(), | ||
| &expected | ||
| ); |
Contributor
There was a problem hiding this comment.
Suggested change
| assert_eq!( | |
| output.as_any().downcast_ref::<BinaryViewArray>().unwrap(), | |
| &expected | |
| ); | |
| assert_eq!(output.as_binary_view(), &expected); |
with use arrow_array::cast::AsArray
Contributor
Author
There was a problem hiding this comment.
Yes, that's much better. I've cleaned up all the tests that were still using more verbose patterns.
Comment on lines
+590
to
+593
| assert_eq!( | ||
| output.as_any().downcast_ref::<StringArray>().unwrap(), | ||
| &expected | ||
| ); |
Contributor
There was a problem hiding this comment.
Suggested change
| assert_eq!( | |
| output.as_any().downcast_ref::<StringArray>().unwrap(), | |
| &expected | |
| ); | |
| assert_eq!(output.as_string::<i32>(), &expected); |
similarly etc.
| @@ -406,55 +406,59 @@ pub fn concat_elements_string_view_array( | |||
| /// | |||
| /// This function errors if the arrays are of different types. | |||
Contributor
There was a problem hiding this comment.
I wonder if we need to slightly update this docstring 🤔
Contributor
Author
There was a problem hiding this comment.
I added some extra text to make the FixedSizeBinary support explicit
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?
None; relates to apache/datafusion#23211
Rationale for this change
concat_elements_fixed_size_binarysupports concatenation ofFixedSizeBinary(n)andFixedSizeBinary(m), but the guard clause inconcat_elements_dynprevents this from actually being possible withdyn Array.What changes are included in this PR?
Adjust the guard clause in
concat_elements_dynto allow concatenation of mixedFixedSizeBinarytypes.Are these changes tested?
FixedSizeBinaryspecificallyconcat_elements_dyn. This maintains coverage of the functions that were being called (since they're still called indirectly) while increasing the coverageconcat_elements_dynAre there any user-facing changes?
Yes, the pre conditions of the function are relaxed. This should not be a breaking change.