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

Method String

cpp/src/arrow/testing/generator.cc:109–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109std::shared_ptr<arrow::Array> ConstantArrayGenerator::String(int64_t size,
110 std::string value) {
111 using BuilderType = typename TypeTraits<StringType>::BuilderType;
112 auto type = TypeTraits<StringType>::type_singleton();
113 auto builder_fn = [&](BuilderType* builder) {
114 DCHECK_OK(builder->Append(std::string_view(value.data())));
115 };
116 return ArrayFromBuilderVisitor(type, value.size() * size, size, builder_fn)
117 .ValueOrDie();
118}
119
120std::shared_ptr<arrow::Array> ConstantArrayGenerator::Zeroes(
121 int64_t size, const std::shared_ptr<DataType>& type) {

Callers

nothing calls this directly

Calls 6

ArrayFromBuilderVisitorFunction · 0.85
ValueOrDieMethod · 0.80
type_singletonFunction · 0.50
AppendMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected