| 230 | } |
| 231 | |
| 232 | static void createArrowPersonTable(main::Connection& connection) { |
| 233 | std::vector<int64_t> ids = {1, 2, 3}; |
| 234 | std::vector<std::string> names = {"Alice", "Bob", "Carol"}; |
| 235 | |
| 236 | ArrowSchemaWrapper schema; |
| 237 | createStructSchema(&schema, 2); |
| 238 | createSchema<int64_t>(schema.children[0], "id"); |
| 239 | createSchema<std::string>(schema.children[1], "name"); |
| 240 | |
| 241 | std::vector<ArrowArrayWrapper> arrays; |
| 242 | arrays.push_back(createStructArray(ids.size(), |
| 243 | {[&](ArrowArray* array) { createInt64Array(array, ids); }, |
| 244 | [&](ArrowArray* array) { createStringArray(array, names); }})); |
| 245 | |
| 246 | auto result = ArrowTableSupport::createViewFromArrowTable(connection, "arrow_rel_person", |
| 247 | std::move(schema), std::move(arrays)); |
| 248 | ASSERT_TRUE(result.queryResult->isSuccess()) << result.queryResult->getErrorMessage(); |
| 249 | } |
| 250 | |
| 251 | static void createNativePersonTable(main::Connection& connection) { |
| 252 | auto result = connection.query( |
no test coverage detected