MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / initScanStateVectors

Method initScanStateVectors

src/processor/operator/scan/scan_table.cpp:68–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68void 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
89void ScanTable::initLocalStateInternal(ResultSet*, ExecutionContext*) {
90 for (auto& pos : opInfo.outVectorsPos) {

Callers

nothing calls this directly

Calls 7

hasCastMethod · 0.80
hasJSONExtractMethod · 0.80
clearMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected