-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH-44555: [C++][Compute] Allow casting struct to bigger nullable stru…
…ct (#44587) ### Rationale for this change Sometimes its useful to add a column full of nulls in a cast. Currently this is supported in top level columns but not inside structs. Example where this is important: delta-io/delta-rs#1610 ### What changes are included in this PR? Add support for filling in columns full of null for nullable struct fields. I've gone for a fairly minimal change that achieves what I needed but I wonder if there should be a more significant change so that this casting is done by field name and ignore the field order. ### Are these changes tested? Yes. The expected behaviour in several existing tests has been altered and a couple of new tests have been added. I also rolled out a custom build with this change internally because it suddenly became a critical problem. ### Are there any user-facing changes? Yes. There are scenarios that previously failed with `struct fields don't match or are in the wrong order` but now succeed after filling in `null`s. * GitHub Issue: #44555 Lead-authored-by: Thomas Newton <[email protected]> Co-authored-by: David Li <[email protected]> Signed-off-by: David Li <[email protected]>
- Loading branch information
1 parent
335e911
commit c14d55d
Showing
3 changed files
with
148 additions
and
66 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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