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

Method type

cpp/src/arrow/array/builder_adaptive.cc:87–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87std::shared_ptr<DataType> AdaptiveUIntBuilder::type() const {
88 auto int_size = int_size_;
89 if (pending_pos_ != 0) {
90 const uint8_t* valid_bytes = pending_has_nulls_ ? pending_valid_ : nullptr;
91 int_size =
92 internal::DetectUIntWidth(pending_data_, valid_bytes, pending_pos_, int_size_);
93 }
94 switch (int_size) {
95 case 1:
96 return uint8();
97 case 2:
98 return uint16();
99 case 4:
100 return uint32();
101 case 8:
102 return uint64();
103 default:
104 DCHECK(false);
105 }
106 return nullptr;
107}
108
109std::shared_ptr<DataType> AdaptiveIntBuilder::type() const {
110 auto int_size = int_size_;

Callers

nothing calls this directly

Calls 2

DetectUIntWidthFunction · 0.85
DetectIntWidthFunction · 0.85

Tested by

no test coverage detected