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

Function TEST

cpp/src/arrow/util/rows_to_batches_test.cc:44–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44TEST(RowsToBatches, BasicUsage) {
45 std::vector<std::vector<int>> data = {{1, 2, 4}, {5, 6, 7}};
46 auto batches = RowsToBatches(kTestSchema, data, IntConvertor).ValueOrDie();
47 auto table = batches->ToTable().ValueOrDie();
48
49 EXPECT_TRUE(CompareJson(*table, R"([1, 5])", "field_1"));
50 EXPECT_TRUE(CompareJson(*table, R"([2, 6])", "field_2"));
51 EXPECT_TRUE(CompareJson(*table, R"([4, 7])", "field_3"));
52}
53
54TEST(RowsToBatches, ConstRange) {
55 const std::vector<std::vector<int>> data = {{1, 2, 4}, {5, 6, 7}};

Callers

nothing calls this directly

Calls 9

RowsToBatchesFunction · 0.85
CompareJsonFunction · 0.85
ValueOrDieMethod · 0.80
beginFunction · 0.70
endFunction · 0.70
schemaFunction · 0.50
fieldFunction · 0.50
ToTableMethod · 0.45
AppendMethod · 0.45

Tested by

no test coverage detected