MCPcopy Create free account
hub / github.com/apache/arrow / AssertIndexByteWidth

Function AssertIndexByteWidth

cpp/src/arrow/array/array_dict_test.cc:1017–1026  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1015
1016template <typename IndexType, typename ValueType>
1017void AssertIndexByteWidth(const std::shared_ptr<DataType>& value_type =
1018 TypeTraits<ValueType>::type_singleton()) {
1019 auto index_type = TypeTraits<IndexType>::type_singleton();
1020 auto dict_type =
1021 checked_pointer_cast<DictionaryType>(dictionary(index_type, value_type));
1022 std::unique_ptr<ArrayBuilder> builder;
1023 ASSERT_OK(MakeBuilder(default_memory_pool(), dict_type, &builder));
1024 auto builder_dict_type = checked_pointer_cast<DictionaryType>(builder->type());
1025 AssertTypeEqual(dict_type->index_type(), builder_dict_type->index_type());
1026}
1027
1028typedef ::testing::Types<Int8Type, Int16Type, Int32Type, Int64Type> IndexTypes;
1029

Callers

nothing calls this directly

Calls 6

default_memory_poolFunction · 0.85
index_typeMethod · 0.80
MakeBuilderFunction · 0.70
type_singletonFunction · 0.50
dictionaryFunction · 0.50
typeMethod · 0.45

Tested by

no test coverage detected