| 66 | } |
| 67 | |
| 68 | void ScanTableInfo::initScanStateVectors(TableScanState& scanState, |
| 69 | const std::vector<ValueVector*>& outVectors, MemoryManager* memoryManager) { |
| 70 | if (!hasColumnCaster) { |
| 71 | // Fast path |
| 72 | scanState.outputVectors = outVectors; |
| 73 | return; |
| 74 | } |
| 75 | scanState.outputVectors.clear(); |
| 76 | for (auto i = 0u; i < columnCasters.size(); ++i) { |
| 77 | auto& caster = columnCasters[i]; |
| 78 | auto vector = outVectors[i]; |
| 79 | if (!caster.hasCast() && !caster.hasJSONExtract()) { |
| 80 | // No need to cast |
| 81 | scanState.outputVectors.push_back(vector); |
| 82 | } else { |
| 83 | caster.init(vector, memoryManager); |
| 84 | scanState.outputVectors.push_back(caster.getVectorBeforeCasting()); |
| 85 | } |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | void ScanTable::initLocalStateInternal(ResultSet*, ExecutionContext*) { |
| 90 | for (auto& pos : opInfo.outVectorsPos) { |
nothing calls this directly
no test coverage detected