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

Function createKnowsTable

test/api/arrow_drop_table_test.cpp:205–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205void createKnowsTable(main::Connection& connection, const std::string& tableName = "knows",
206 const char* weightName = "weight") {
207 std::vector<ArrowArrayWrapper> arrays;
208 arrays.push_back(makeKnowsBatch({{1, 2, 10, "friend", DATE_2020_01_01, {1}},
209 {1, 3, 20, "colleague", DATE_2021_01_01, {1, 2}},
210 {2, 3, 30, "friend", DATE_2022_01_01, {1}}}));
211 arrays.push_back(makeKnowsBatch({{2, 4, 40, "mentor", DATE_2019_01_01, {2, 3}},
212 {3, 5, 15, "friend", DATE_2023_01_01, {1}}}));
213 auto result = ArrowTableSupport::createRelTableFromArrowTable(connection, tableName, "person",
214 "person", makeKnowsSchema(weightName), std::move(arrays));
215 ASSERT_TRUE(result.queryResult->isSuccess()) << result.queryResult->getErrorMessage();
216}
217
218void createCsrNodeTable(main::Connection& connection, const std::string& tableName = "csr_node") {
219 std::vector<ArrowArrayWrapper> arrays;

Callers 1

TEST_FFunction · 0.85

Calls 5

makeKnowsBatchFunction · 0.70
makeKnowsSchemaFunction · 0.70
push_backMethod · 0.45
isSuccessMethod · 0.45
getErrorMessageMethod · 0.45

Tested by

no test coverage detected