MCPcopy Create free account
hub / github.com/apache/impala / BitmapToString

Function BitmapToString

be/src/kudu/util/bitmap.cc:153–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153string BitmapToString(const uint8_t *bitmap, size_t num_bits) {
154 string s;
155 size_t index = 0;
156 while (index < num_bits) {
157 StringAppendF(&s, "%4zu: ", index);
158 for (int i = 0; i < 8 && index < num_bits; ++i) {
159 for (int j = 0; j < 8 && index < num_bits; ++j) {
160 StringAppendF(&s, "%d", BitmapTest(bitmap, index));
161 index++;
162 }
163 StringAppendF(&s, " ");
164 }
165 StringAppendF(&s, "\n");
166 }
167 return s;
168}
169
170} // namespace kudu

Callers 1

TESTFunction · 0.85

Calls 2

StringAppendFFunction · 0.85
BitmapTestFunction · 0.85

Tested by 1

TESTFunction · 0.68