| 122 | } |
| 123 | |
| 124 | void 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 |
nothing calls this directly
no test coverage detected