| 211 | } |
| 212 | |
| 213 | void StringColumn::scanUnfiltered(const SegmentState& state, offset_t startOffsetInChunk, |
| 214 | offset_t numValuesToRead, ValueVector* resultVector, sel_t startPosInVector) const { |
| 215 | // TODO: Replace indices with ValueVector to avoid maintaining `scan` interface from |
| 216 | // uint8_t*. |
| 217 | auto indices = std::make_unique<string_index_t[]>(numValuesToRead); |
| 218 | indexColumn->scanSegment(getChildState(state, ChildStateIndex::INDEX), startOffsetInChunk, |
| 219 | numValuesToRead, reinterpret_cast<uint8_t*>(indices.get())); |
| 220 | |
| 221 | std::vector<std::pair<string_index_t, uint64_t>> offsetsToScan; |
| 222 | for (auto i = 0u; i < numValuesToRead; i++) { |
| 223 | if (!resultVector->isNull(startPosInVector + i)) { |
| 224 | offsetsToScan.emplace_back(indices[i], startPosInVector + i); |
| 225 | } |
| 226 | } |
| 227 | |
| 228 | if (offsetsToScan.size() == 0) { |
| 229 | // All scanned values are null |
| 230 | return; |
| 231 | } |
| 232 | dictionary.scan(getChildState(state, ChildStateIndex::OFFSET), |
| 233 | getChildState(state, ChildStateIndex::DATA), offsetsToScan, resultVector, |
| 234 | getChildState(state, ChildStateIndex::INDEX).metadata); |
| 235 | } |
| 236 | |
| 237 | void StringColumn::scanFiltered(const SegmentState& state, offset_t startOffsetInChunk, |
| 238 | ValueVector* resultVector, offset_t offsetInResult) const { |
nothing calls this directly
no test coverage detected