You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Will Jones (Jira)" <ji...@apache.org> on 2022/10/07 16:51:00 UTC

[jira] [Created] (ARROW-17963) [C++] Implement cast_dictionary for string

Will Jones created ARROW-17963:
----------------------------------

             Summary: [C++] Implement cast_dictionary for string
                 Key: ARROW-17963
                 URL: https://issues.apache.org/jira/browse/ARROW-17963
             Project: Apache Arrow
          Issue Type: Improvement
          Components: C++
            Reporter: Will Jones
             Fix For: 11.0.0


We can cast dictionary(string, X) to string, but not the other way around.

{code:R}
> Array$create(c("a", "b"))$cast(dictionary(int32(), string()))
Error: NotImplemented: Unsupported cast from string to dictionary using function cast_dictionary
/Users/willjones/Documents/arrows/arrow/cpp/src/arrow/compute/function.cc:249  func.DispatchBest(&in_types)

> Array$create(as.factor(c("a", "b")))$cast(string())
Array
<string>
[
  "a",
  "b"
]
{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)