| 258 | } |
| 259 | |
| 260 | static void createArrowKnowsTable(main::Connection& connection) { |
| 261 | std::vector<int64_t> from = {1, 1, 2}; |
| 262 | std::vector<int64_t> to = {2, 3, 3}; |
| 263 | std::vector<int64_t> weight = {10, 20, 30}; |
| 264 | |
| 265 | ArrowSchemaWrapper schema; |
| 266 | createStructSchema(&schema, 3); |
| 267 | createSchema<int64_t>(schema.children[0], "from"); |
| 268 | createSchema<int64_t>(schema.children[1], "to"); |
| 269 | createSchema<int64_t>(schema.children[2], "weight"); |
| 270 | |
| 271 | std::vector<ArrowArrayWrapper> arrays; |
| 272 | arrays.push_back(createStructArray(from.size(), |
| 273 | {[&](ArrowArray* array) { createInt64Array(array, from); }, |
| 274 | [&](ArrowArray* array) { createInt64Array(array, to); }, |
| 275 | [&](ArrowArray* array) { createInt64Array(array, weight); }})); |
| 276 | |
| 277 | auto result = ArrowTableSupport::createRelTableFromArrowTable(connection, "arrow_rel_knows", |
| 278 | "arrow_rel_person", "arrow_rel_person", std::move(schema), std::move(arrays)); |
| 279 | ASSERT_TRUE(result.queryResult->isSuccess()) << result.queryResult->getErrorMessage(); |
| 280 | } |
| 281 | |
| 282 | void createComplexArrowPersonTable(main::Connection& connection, |
| 283 | const std::string& tableName = "person") { |
no test coverage detected