-
Notifications
You must be signed in to change notification settings - Fork 2.2k
fix: spark array return type mismatch when inner data type is LargeList #18485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
6247d35
fix: spark array return type mismatch when inner data type is LargeList
jizezhang 4e1a93d
formatting
jizezhang 9ff0bb9
Move generate_series projection logic into LazyMemoryStream (#18373)
mkleen 312d5c8
Consolidate flight examples (#18142) (#18442)
cj-zhukov 2151741
feat: support named arguments for aggregate and window udfs (#18389)
bubulalabu d985475
Support reverse for ListView (#18424)
vegarsti e91b149
fold return_type logic into return_field_from_args
jizezhang edc9490
Merge branch 'main' into spark-array-fix
jizezhang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm actually thinking maybe we keep this and just fold
return_typelogic into here; specifically because it returnsfalsefor the nullability whereas default implementation forreturn_field_from_argsreturnstruefor nullability.return_typeto satisfy trait, but we can have it return an internal err, see:datafusion/datafusion/functions-nested/src/map_values.rs
Lines 95 to 112 in b52a81d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah thanks for pointing it out, will raise a revision.
For my learning,
make_arrayimplementsreturn_typebut notreturn_field_from_args,datafusion/datafusion/functions-nested/src/make_array.rs
Line 105 in b52a81d
return_field_from_argsthat has nullable set totrue. How would nullability on the return field affect behavior of sql queries? Thanks.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with the degree to which DataFusion uses the nullability information of a field, so I can't say what the impact would be. But I assume it's better to be more informative where possible, e.g. we know make array function can't ever return a null so it's good if we can preserve that information, especially since the Spark version already had it.