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

Function AppendList

cpp/src/arrow/table_builder_test.cc:68–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66
67template <typename ValueType, typename T>
68void AppendList(ListBuilder* builder, const std::vector<std::vector<T>>& values,
69 const std::vector<bool>& is_valid) {
70 auto values_builder = checked_cast<ValueType*>(builder->value_builder());
71
72 for (size_t i = 0; i < values.size(); ++i) {
73 if (is_valid.size() == 0 || is_valid[i]) {
74 ASSERT_OK(builder->Append());
75 AppendValues<ValueType, T>(values_builder, values[i], {});
76 } else {
77 ASSERT_OK(builder->AppendNull());
78 }
79 }
80}
81
82TEST_F(TestRecordBatchBuilder, Basics) {
83 auto schema = ExampleSchema1();

Callers

nothing calls this directly

Calls 4

value_builderMethod · 0.45
sizeMethod · 0.45
AppendMethod · 0.45
AppendNullMethod · 0.45

Tested by

no test coverage detected