-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[C++][Python] Add compute kernel for "dictionary_decode" #34588
Comments
Hi, where is the code of dictionary_encode in cpp? |
take |
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):
I agree that an explicit |
What is the point of this? Not every function needs to be wrapped in a compute function. |
Quoting the last part of my top post:
Being able to decode a chunked array was my motivating use case to open this issue. Of course, for just that we could also add a |
Adding |
That might be what you meant, but to be nitpicky: that actually doesn't exist, it's only Another potential (consistency) argument: |
Hmm, I see. |
…5356) **Rationale for this change** This PR is for [Issue-34588](#34588). Discussing with @ westonpace, a MetaFunction for "dictionary_decode" is implemented instead of adding a compute kernel. **What changes are included in this PR?** C++: Meta Function of dictionary_decode. Python: Test **Are these changes tested?** One test in tests/test_compute.py * Closes: #34588 Lead-authored-by: Junming Chen <junming.chen.r@outlook.com> Co-authored-by: Alenka Frim <AlenkaF@users.noreply.github.com> Co-authored-by: Weston Pace <weston.pace@gmail.com> Signed-off-by: Weston Pace <weston.pace@gmail.com>
…e" (apache#35356) **Rationale for this change** This PR is for [Issue-34588](apache#34588). Discussing with @ westonpace, a MetaFunction for "dictionary_decode" is implemented instead of adding a compute kernel. **What changes are included in this PR?** C++: Meta Function of dictionary_decode. Python: Test **Are these changes tested?** One test in tests/test_compute.py * Closes: apache#34588 Lead-authored-by: Junming Chen <junming.chen.r@outlook.com> Co-authored-by: Alenka Frim <AlenkaF@users.noreply.github.com> Co-authored-by: Weston Pace <weston.pace@gmail.com> Signed-off-by: Weston Pace <weston.pace@gmail.com>
…e" (apache#35356) **Rationale for this change** This PR is for [Issue-34588](apache#34588). Discussing with @ westonpace, a MetaFunction for "dictionary_decode" is implemented instead of adding a compute kernel. **What changes are included in this PR?** C++: Meta Function of dictionary_decode. Python: Test **Are these changes tested?** One test in tests/test_compute.py * Closes: apache#34588 Lead-authored-by: Junming Chen <junming.chen.r@outlook.com> Co-authored-by: Alenka Frim <AlenkaF@users.noreply.github.com> Co-authored-by: Weston Pace <weston.pace@gmail.com> Signed-off-by: Weston Pace <weston.pace@gmail.com>
The pyarrow DictionaryArray class has a
dictionary_decode()
method, as a counterpart of thedictionary_encode()
. However, this is not an actual kernel, but just implemented manually (it's also just a simple "take" of course):arrow/python/pyarrow/array.pxi
Lines 2506 to 2510 in fe88d9a
It would be nice to make an actual kernel for this, just like we have a "dictionary_encode" kernel (and eg also "run_end_encode" and "run_end_decode" kernels). Among other things, this makes it available as a function in pyarrow.compute (and for example ensures you can call this on a chunked array more easily).
The text was updated successfully, but these errors were encountered: