-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
Describe the bug
When I try to concat two dictionary encoded columns it doesn't work
To Reproduce
Concat constants
> select arrow_cast('foo', 'Dictionary(Int32, Utf8)') || arrow_cast('bar', 'Dictionary(Int32, Utf8)');
Error during planning: Cannot infer common string type for string concat operation Dictionary(Int32, Utf8) || Dictionary(Int32, Utf8)Concat columns
> create table t as values (arrow_cast('foo', 'Dictionary(Int32, Utf8)'), arrow_cast('bar', 'Dictionary(Int32, Utf8)'));
0 row(s) fetched.
Elapsed 0.010 seconds.
> select column1 || column2 from t;
Error during planning: Cannot infer common string type for string concat operation Dictionary(Int32, Utf8) || Dictionary(Int32, Utf8)Expected behavior
Both queries should result in the single string foobar
Additional context
Found this working on #12063 with @dharanad
I believe the fix will be to extend string_concat_coercion (also changed in #12063) to also handle dictionaries.
We can likely follow the model of dictionary comparison coercion:
| fn dictionary_coercion( |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers