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

Method toString

bolt/vector/SelectivityVector.cpp:46–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46std::string SelectivityVector::toString(
47 vector_size_t maxSelectedRowsToPrint) const {
48 const auto selectedCnt = countSelected();
49
50 BOLT_CHECK_GE(maxSelectedRowsToPrint, 0);
51
52 std::stringstream out;
53 out << selectedCnt << " out of " << size() << " rows selected between "
54 << begin() << " and " << end();
55
56 if (selectedCnt > 0 && maxSelectedRowsToPrint > 0) {
57 out << ": ";
58 int cnt = 0;
59 testSelected([&](auto row) {
60 if (cnt > 0) {
61 out << ", ";
62 }
63 out << row;
64 ++cnt;
65 return cnt < maxSelectedRowsToPrint;
66 });
67 }
68 return out.str();
69}
70
71void translateToInnerRows(
72 const SelectivityVector& outerRows,

Callers

nothing calls this directly

Calls 2

sizeFunction · 0.85
strMethod · 0.80

Tested by

no test coverage detected