File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
datafusion/functions-nested/src Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -94,9 +94,10 @@ impl ScalarUDFImpl for MapKeysFunc {
94
94
fn return_type ( & self , arg_types : & [ DataType ] ) -> Result < DataType > {
95
95
let [ map_type] = take_function_args ( self . name ( ) , arg_types) ?;
96
96
let map_fields = get_map_entry_field ( map_type) ?;
97
+ // internal array nullability is true to be in sync with DuckDB
97
98
Ok ( DataType :: List ( Arc :: new ( Field :: new_list_field (
98
99
map_fields. first ( ) . unwrap ( ) . data_type ( ) . clone ( ) ,
99
- false ,
100
+ true ,
100
101
) ) ) )
101
102
}
102
103
@@ -121,7 +122,8 @@ fn map_keys_inner(args: &[ArrayRef]) -> Result<ArrayRef> {
121
122
} ;
122
123
123
124
Ok ( Arc :: new ( ListArray :: new (
124
- Arc :: new ( Field :: new_list_field ( map_array. key_type ( ) . clone ( ) , false ) ) ,
125
+ // internal array nullability is true to be in sync with DuckDB
126
+ Arc :: new ( Field :: new_list_field ( map_array. key_type ( ) . clone ( ) , true ) ) ,
125
127
map_array. offsets ( ) . clone ( ) ,
126
128
Arc :: clone ( map_array. keys ( ) ) ,
127
129
map_array. nulls ( ) . cloned ( ) ,
You can’t perform that action at this time.
0 commit comments