You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Andrei Nesterov (Jira)" <ji...@apache.org> on 2021/06/17 08:22:00 UTC

[jira] [Closed] (ARROW-13102) [Python] Casting between dictionary types

     [ https://issues.apache.org/jira/browse/ARROW-13102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrei Nesterov closed ARROW-13102.
-----------------------------------
    Resolution: Duplicate

> [Python] Casting between dictionary types
> -----------------------------------------
>
>                 Key: ARROW-13102
>                 URL: https://issues.apache.org/jira/browse/ARROW-13102
>             Project: Apache Arrow
>          Issue Type: Improvement
>            Reporter: Andrei Nesterov
>            Priority: Major
>
> Casting between dictionary types isn't implemented. It leads to boilerplate code.
>  
> {code:python}
> import pyarrow as pa
> dt = pa.array([b"foo", b"bar", b"baz", b"bar", b"baz", b"bar"], type=pa.binary())
> dictionary = dt.dictionary_encode()
> print(dictionary.type)
> # dictionary<values=binary, indices=int32, ordered=0>
> pc.cast(dictionary, pa.dictionary(index_type=pa.int8(), value_type=pa.binary()), safe=False)
> {code}
> {code:java}
> pyarrow.lib.ArrowNotImplementedError: Unsupported cast from dictionary<values=binary, indices=int32, ordered=0> to dictionary using function cast_dictionary
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)