You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem or challenge?
DataFusion has two SQL constructs to lookup a key k in a map m, m[k] (planned as get_field) and map_extract(m, k)
Their APIs are slightly different (get_field returns the value or NULL, map_extract returns a singleton list or an empty list), but the core work is the same. There are three copies of the underlying key lookup code with different bugs and performance characteristics:
get_field::process_map_array: a vectorized eq kernel between the scalar key and every map key, then a scan of the resulting bitmap. We take this path incorrectly for maps with list-typed keys, resulting in a panic (map[k] panics when key type is list and key is absent #25082)
get_field::process_map_with_nested_key: a comparator that compares each entry against the lookup key.
Since the eq kernel doesn't handle nested lists/maps, we probably want two code paths, but either way we can simplify and unify the code over the current state.
Is your feature request related to a problem or challenge?
DataFusion has two SQL constructs to lookup a key
kin a mapm,m[k](planned asget_field) andmap_extract(m, k)Their APIs are slightly different (
get_fieldreturns the value or NULL,map_extractreturns a singleton list or an empty list), but the core work is the same. There are three copies of the underlying key lookup code with different bugs and performance characteristics:map_extract(after fix, perf: Use Arrow comparator for key comparison inmap_extract#24999): one arrow-ord comparator over the whole batch, per-row lookup keys, early exit per row, output sized to the number of matches.get_field::process_map_array: a vectorized eq kernel between the scalar key and every map key, then a scan of the resulting bitmap. We take this path incorrectly for maps with list-typed keys, resulting in a panic (map[k]panics when key type is list and key is absent #25082)get_field::process_map_with_nested_key: a comparator that compares each entry against the lookup key.Since the
eqkernel doesn't handle nested lists/maps, we probably want two code paths, but either way we can simplify and unify the code over the current state.Describe the solution you'd like
No response
Describe alternatives you've considered
No response
Additional context
No response