MCPcopy Create free account
hub / github.com/apache/arrow / MakeBasicDataset

Function MakeBasicDataset

cpp/src/arrow/dataset/scanner_test.cc:2365–2394  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2363}
2364
2365DatasetAndBatches MakeBasicDataset() {
2366 const auto dataset_schema = ::arrow::schema({
2367 field("a", int32()),
2368 field("b", boolean()),
2369 field("c", int32()),
2370 });
2371
2372 const auto physical_schema = SchemaFromColumnNames(dataset_schema, {"a", "b"});
2373
2374 return DatasetAndBatchesFromJSON(dataset_schema, physical_schema,
2375 {
2376 {
2377 R"([{"a": 1, "b": null},
2378 {"a": 2, "b": true}])",
2379 R"([{"a": null, "b": true},
2380 {"a": 3, "b": false}])",
2381 },
2382 {
2383 R"([{"a": null, "b": true},
2384 {"a": 4, "b": false}])",
2385 R"([{"a": 5, "b": null},
2386 {"a": 6, "b": false},
2387 {"a": 7, "b": false}])",
2388 },
2389 },
2390 {
2391 equal(field_ref("c"), literal(23)),
2392 equal(field_ref("c"), literal(47)),
2393 });
2394}
2395
2396DatasetAndBatches MakeNestedDataset() {
2397 const auto dataset_schema = ::arrow::schema({

Callers 1

TESTFunction · 0.85

Calls 6

SchemaFromColumnNamesFunction · 0.85
equalFunction · 0.85
field_refFunction · 0.85
schemaFunction · 0.50
fieldFunction · 0.50
literalFunction · 0.50

Tested by

no test coverage detected