romainfrancois commented on pull request #7435:
URL: https://github.com/apache/arrow/pull/7435#issuecomment-644800961
also added `VectorToArrayConverter::Visit` for dictionaries to that we can
handle things like list(factor()), the implementation is simpler than the
original `MakeFactorArray` as it leverages `StringDictionaryBuilder`, but it
looks like that does not respect the "ordered" property.
``` r
library(arrow, warn.conflicts = FALSE)
o <- ordered(c("b", "a"), levels = c("a", "b", "c"))
# this goes trough MakeFactorArray
Array$create(o)$type
#> DictionaryType
#> dictionary<values=string, indices=int8, ordered>
# this goes through VectorToArrayConverter::Visit >> MakeBuilder() ...
Array$create(list(o))$type$value_type
#> DictionaryType
#> dictionary<values=string, indices=int8>
```
<sup>Created on 2020-06-16 by the [reprex
package](https://reprex.tidyverse.org) (v0.3.0)</sup>
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]