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)

Reply via email to