Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-17963

[C++] Implement casting to dictionary type (dictionary_encode as a cast)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 11.0.0
    • C++

    Description

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

      > 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"
      ]
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              wjones127 Will Jones
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: