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

Function TypeErasedIntBuilder

cpp/src/arrow/builder.cc:88–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86 DCHECK(false);
87 }
88 explicit TypeErasedIntBuilder(const std::shared_ptr<DataType>& type,
89 MemoryPool* pool = default_memory_pool(),
90 int64_t alignment = kDefaultBufferAlignment)
91 : ArrayBuilder(pool), type_id_(type->id()) {
92 DCHECK(is_integer(type_id_));
93 switch (type_id_) {
94 case Type::UINT8:
95 builder_ = std::make_unique<UInt8Builder>(pool);
96 break;
97 case Type::INT8:
98 builder_ = std::make_unique<Int8Builder>(pool);
99 break;
100 case Type::UINT16:
101 builder_ = std::make_unique<UInt16Builder>(pool);
102 break;
103 case Type::INT16:
104 builder_ = std::make_unique<Int16Builder>(pool);
105 break;
106 case Type::UINT32:
107 builder_ = std::make_unique<UInt32Builder>(pool);
108 break;
109 case Type::INT32:
110 builder_ = std::make_unique<Int32Builder>(pool);
111 break;
112 case Type::UINT64:
113 builder_ = std::make_unique<UInt64Builder>(pool);
114 break;
115 case Type::INT64:
116 builder_ = std::make_unique<Int64Builder>(pool);
117 break;
118 default:
119 DCHECK(false);
120 }
121 }
122
123 void Reset() override { return builder_->Reset(); }
124 Status Append(int32_t value) {

Callers

nothing calls this directly

Calls 3

default_memory_poolFunction · 0.85
is_integerFunction · 0.70
idMethod · 0.45

Tested by

no test coverage detected