westonpace commented on issue #34588:
URL: https://github.com/apache/arrow/issues/34588#issuecomment-1504276524
> Hi, where is the code of dictionary_encode in cpp?
This can be done today with the cast function (and I'm pretty sure that is
how its done when we need to decode in Acero):
>>> x = pa.array(["a", "a", "b"], pa.dictionary(pa.int8(), pa.string()))
>>> x
<pyarrow.lib.DictionaryArray object at 0x7f9eaaf60900>
-- dictionary:
[
"a",
"b"
]
-- indices:
[
0,
0,
1
]
>>> pc.cast(x, pa.string())
<pyarrow.lib.StringArray object at 0x7f9eaaf80b20>
[
"a",
"a",
"b"
]
I agree that an explicit `dictionary_decode` alias would be nice. Maybe we
can use a MetaFunction?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]