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

Method SetUp

cpp/src/arrow/array/array_struct_test.cc:362–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

360class TestStructBuilder : public ::testing::Test {
361 public:
362 void SetUp() {
363 auto int32_type = int32();
364 auto char_type = int8();
365 auto list_type = list(char_type);
366
367 std::vector<std::shared_ptr<DataType>> types = {list_type, int32_type};
368 std::vector<std::shared_ptr<Field>> fields;
369 fields.push_back(field("list", list_type));
370 fields.push_back(field("int", int32_type));
371
372 type_ = struct_(fields);
373 value_fields_ = fields;
374
375 std::unique_ptr<ArrayBuilder> tmp;
376 ASSERT_OK(MakeBuilder(pool_, type_, &tmp));
377 builder_.reset(checked_cast<StructBuilder*>(tmp.release()));
378 ASSERT_EQ(2, static_cast<int>(builder_->num_fields()));
379 }
380
381 void Done() {
382 std::shared_ptr<Array> out;

Callers

nothing calls this directly

Calls 8

listFunction · 0.85
struct_Function · 0.85
push_backMethod · 0.80
MakeBuilderFunction · 0.70
fieldFunction · 0.50
resetMethod · 0.45
releaseMethod · 0.45
num_fieldsMethod · 0.45

Tested by

no test coverage detected