mrkn commented on a change in pull request #7898:
URL: https://github.com/apache/arrow/pull/7898#discussion_r469945583
##########
File path: cpp/src/arrow/array/builder_dict.h
##########
@@ -105,18 +105,46 @@ class DictionaryBuilderBase : public ArrayBuilder {
// WARNING: the type given below is the value type, not the DictionaryType.
// The DictionaryType is instantiated on the Finish() call.
- template <typename T1 = T>
- DictionaryBuilderBase(enable_if_t<!std::is_base_of<FixedSizeBinaryType,
T1>::value,
+ template <typename B = BuilderType, typename T1 = T>
+ DictionaryBuilderBase(uint8_t start_int_size,
+ enable_if_t<std::is_base_of<AdaptiveIntBuilderBase,
B>::value &&
+ !is_fixed_size_binary_type<T1>::value,
const std::shared_ptr<DataType>&>
value_type,
MemoryPool* pool = default_memory_pool())
+ : ArrayBuilder(pool),
+ memo_table_(new internal::DictionaryMemoTable(pool, value_type)),
+ delta_offset_(0),
+ byte_width_(-1),
+ indices_builder_(start_int_size, pool),
+ value_type_(value_type) {}
+
+ template <typename T1 = T>
+ DictionaryBuilderBase(
Review comment:
This constructor is for the cases that BuilderType is not
AdaptiveIntBuilder. The constructor for the case of AdaptiveIntBuilder cannot
be reused by this constructor because the constructor of a non-adaptive
IntBuilder (i.e. `indices_builder_`) doesn't take the `start_int_size` argument.
----------------------------------------------------------------
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]