| 203 | } |
| 204 | |
| 205 | void 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 | |
| 218 | void createCsrNodeTable(main::Connection& connection, const std::string& tableName = "csr_node") { |
| 219 | std::vector<ArrowArrayWrapper> arrays; |
no test coverage detected