| 1430 | // for non-nulls in rows. |
| 1431 | template <typename LengthFunc> |
| 1432 | void appendLengths( |
| 1433 | const uint64_t* nulls, |
| 1434 | folly::Range<const vector_size_t*> rows, |
| 1435 | int32_t numNonNull, |
| 1436 | LengthFunc lengthFunc) { |
| 1437 | const auto numRows = rows.size(); |
| 1438 | if (nulls == nullptr) { |
| 1439 | appendNonNull(numRows); |
| 1440 | for (auto i = 0; i < numRows; ++i) { |
| 1441 | appendLength(lengthFunc(rows[i])); |
| 1442 | } |
| 1443 | } else { |
| 1444 | appendNulls(nulls, 0, numRows, numNonNull); |
| 1445 | for (auto i = 0; i < numRows; ++i) { |
| 1446 | if (bits::isBitSet(nulls, i)) { |
| 1447 | appendLength(lengthFunc(rows[i])); |
| 1448 | } else { |
| 1449 | appendLength(0); |
| 1450 | } |
| 1451 | } |
| 1452 | } |
| 1453 | } |
| 1454 | |
| 1455 | template <typename T> |
| 1456 | void append(folly::Range<const T*> values) { |
no test coverage detected