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

Method addInput

bolt/exec/AggregationMasks.cpp:45–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45void AggregationMasks::addInput(
46 const RowVectorPtr& input,
47 const SelectivityVector& rows) {
48 for (auto& entry : maskedRows_) {
49 SelectivityVector& maskedRows = entry.second;
50 maskedRows = rows;
51
52 // Get the projection column vector that would be our mask.
53 const auto& maskVector = input->childAt(entry.first);
54
55 // Get decoded vector and update the masked selectivity vector.
56 decodedMask_.decode(*maskVector, rows);
57 if (decodedMask_.isConstantMapping()) {
58 if (decodedMask_.isNullAt(rows.begin()) ||
59 !decodedMask_.valueAt<bool>(rows.begin())) {
60 maskedRows.setValidRange(rows.begin(), rows.end(), false);
61 maskedRows.updateBounds();
62 }
63 } else {
64 rows.applyToSelected([&](vector_size_t i) {
65 if (decodedMask_.isNullAt(i) || !decodedMask_.valueAt<bool>(i)) {
66 maskedRows.setValid(i, false);
67 }
68 });
69 maskedRows.updateBounds();
70 }
71 }
72}
73
74const SelectivityVector* FOLLY_NULLABLE
75AggregationMasks::activeRows(int32_t aggregationIndex) const {

Callers

nothing calls this directly

Calls 10

childAtMethod · 0.80
isConstantMappingMethod · 0.80
setValidRangeMethod · 0.80
updateBoundsMethod · 0.80
applyToSelectedMethod · 0.80
setValidMethod · 0.80
decodeMethod · 0.45
isNullAtMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected