MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / createPersonTable

Function createPersonTable

test/api/arrow_drop_table_test.cpp:193–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193void createPersonTable(main::Connection& connection, const std::string& tableName = "person") {
194 std::vector<ArrowArrayWrapper> arrays;
195 arrays.push_back(makePersonBatch(
196 {{1, "Alice", 25, DATE_2020_01_01, {100, 200}}, {2, "Bob", 30, DATE_2021_01_01, {300}},
197 {3, "Carol", 40, DATE_2022_01_01, {100, 200, 300}}}));
198 arrays.push_back(makePersonBatch(
199 {{4, "Dave", 50, DATE_2023_01_01, {400, 500}}, {5, "Eve", 35, DATE_2024_01_01, {100}}}));
200 auto result = ArrowTableSupport::createViewFromArrowTable(connection, tableName,
201 makePersonSchema(), std::move(arrays));
202 ASSERT_TRUE(result.queryResult->isSuccess()) << result.queryResult->getErrorMessage();
203}
204
205void createKnowsTable(main::Connection& connection, const std::string& tableName = "knows",
206 const char* weightName = "weight") {

Callers 1

TEST_FFunction · 0.85

Calls 5

makePersonSchemaFunction · 0.85
makePersonBatchFunction · 0.70
push_backMethod · 0.45
isSuccessMethod · 0.45
getErrorMessageMethod · 0.45

Tested by

no test coverage detected