Commit d011bce
fix: HashJoin panic with dictionary-encoded columns in multi-key joins (apache#20441)
## Which issue does this PR close?
- Closes apache#20437
## Rationale for this change
`flatten_dictionary_array` returned only the unique values rather then
the full expanded array when being called on a `DictionaryArray`. When
building a `StructArray` this caused a length mismatch panic.
## What changes are included in this PR?
Replaced `array.values()` with `arrow::compute::cast(array, value_type)`
in `flatten_dictionary_array`, which properly expands the dictionary
into a full length array matching the row count.
## Are these changes tested?
Yes, both a new unit test aswell as a regression test were added.
## Are there any user-facing changes?
Nope
---------
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>1 parent 9e0e3f8 commit d011bce
1 file changed
Lines changed: 1 addition & 0 deletions
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
0 commit comments