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

Method setEmptyFramesResult

bolt/exec/WindowFunction.cpp:124–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124void WindowFunction::setEmptyFramesResult(
125 const SelectivityVector& validRows,
126 vector_size_t resultOffset,
127 const VectorPtr& defaultResult,
128 const VectorPtr& result) {
129 if (validRows.isAllSelected()) {
130 return;
131 }
132 // Set the null bit for all rows to true if the defaultResult is NULL and
133 // there are no valid rows.
134 if (!validRows.hasSelections() && defaultResult->isNullAt(0)) {
135 uint64_t* rawNulls = result->mutableRawNulls();
136 bits::fillBits(
137 rawNulls, resultOffset, resultOffset + validRows.size(), bits::kNull);
138 return;
139 }
140
141 invalidRows_.resizeFill(validRows.size(), true);
142 invalidRows_.deselect(validRows);
143 invalidRows_.applyToSelected([&](auto i) {
144 result->copy(defaultResult.get(), resultOffset + i, 0, 1);
145 });
146}
147
148} // namespace bytedance::bolt::exec

Callers

nothing calls this directly

Calls 10

fillBitsFunction · 0.85
isAllSelectedMethod · 0.80
hasSelectionsMethod · 0.80
resizeFillMethod · 0.80
deselectMethod · 0.80
applyToSelectedMethod · 0.80
isNullAtMethod · 0.45
sizeMethod · 0.45
copyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected