MCPcopy Create free account
hub / github.com/apache/arrow / NullInKey

Function NullInKey

cpp/src/arrow/acero/hash_join_node_test.cc:542–569  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

540}
541
542std::vector<bool> NullInKey(const std::vector<JoinKeyCmp>& cmp,
543 const std::vector<std::shared_ptr<Array>>& key) {
544 ARROW_DCHECK(cmp.size() <= key.size());
545 ARROW_DCHECK(key.size() > 0);
546 std::vector<bool> result;
547 result.resize(key[0]->length());
548 for (size_t i = 0; i < result.size(); ++i) {
549 result[i] = false;
550 }
551 for (size_t i = 0; i < cmp.size(); ++i) {
552 if (cmp[i] != JoinKeyCmp::EQ) {
553 continue;
554 }
555 if (key[i]->data()->buffers[0] == NULLPTR) {
556 continue;
557 }
558 const uint8_t* nulls = key[i]->data()->buffers[0]->data();
559 if (!nulls) {
560 continue;
561 }
562 for (size_t j = 0; j < result.size(); ++j) {
563 if (!bit_util::GetBit(nulls, j)) {
564 result[j] = true;
565 }
566 }
567 }
568 return result;
569}
570
571void GenRandomJoinTables(ExecContext* ctx, Random64Bit& rng, int num_rows_l,
572 int num_rows_r, int num_keys_common, int num_keys_left,

Callers 2

HashJoinSimpleFunction · 0.85
TESTFunction · 0.85

Calls 5

resizeMethod · 0.80
GetBitFunction · 0.50
sizeMethod · 0.45
lengthMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected