MCPcopy Create free account
hub / github.com/bytedance/bolt / TEST_F

Function TEST_F

bolt/exec/tests/RowToColumnVectorTest.cpp:71–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69};
70
71TEST_F(RowToColumnVectorTest, basic) {
72 VectorPtr ans = makeFlatVector<int32_t>(1, INTEGER());
73 auto data = std::make_unique<char[]>(100);
74 const int32_t x = 16;
75 std::memcpy(data.get(), &x, sizeof(int32_t));
76 auto ptr = data.get();
77 std::vector<vector_size_t> rowNumbers{0};
78 rowToColumnVector(
79 &ptr,
80 folly::Range<const vector_size_t*>(rowNumbers.data(), rowNumbers.size()),
81 RowColumn(0, RowColumn::kNotNullOffset),
82 0,
83 ans);
84 auto expect =
85 makeFlatVector<int32_t>(1, [](auto row) -> int32_t { return x; });
86 ASSERT_TRUE(ans->equalValueAt(expect.get(), 0, 0));
87}
88
89TEST_F(RowToColumnVectorTest, string) {
90 VectorPtr ans = makeFlatVector<StringView>(1, VARCHAR());

Callers

nothing calls this directly

Calls 9

memcpyFunction · 0.85
rowToColumnVectorFunction · 0.85
RowColumnClass · 0.85
SelectivityVectorClass · 0.85
equalValueAtMethod · 0.80
getMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected