| 44 | } |
| 45 | |
| 46 | std::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 | |
| 71 | void translateToInnerRows( |
| 72 | const SelectivityVector& outerRows, |