[
https://issues.apache.org/jira/browse/ARROW-7517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17054706#comment-17054706
]
Alex Baden commented on ARROW-7517:
-----------------------------------
It looks like this is a property of the builder, not the type. The builder is
an adaptive builder, so the type of the indices will increase as the range of
each index type is exceed. Using the `StringDictionary32Builder` allows one to
force 32-bit indices if a consistent type is desired. Not sure if it would be
worthwhile doing the same for the other types – at OmniSci we happen to max out
at 32-bit indices, so this works for us, for now.
> [C++] Builder does not honour dictionary type provided during initialization
> ----------------------------------------------------------------------------
>
> Key: ARROW-7517
> URL: https://issues.apache.org/jira/browse/ARROW-7517
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++
> Affects Versions: 0.15.0
> Reporter: Wamsi Viswanath
> Priority: Major
>
> Below is an example for reproducing the issue:
> [https://gist.github.com/wamsiv/d48ec37a9a9b5f4d484de6ff86a3870d]
> Builder automatically optimizes the dictionary type depending upon the number
> of unique values provided which results in schema mismatch.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)