| 90 | : loader_(loader) {} |
| 91 | |
| 92 | void loadInternal( |
| 93 | RowSet rows, |
| 94 | ValueHook* hook, |
| 95 | vector_size_t resultSize, |
| 96 | VectorPtr* result) override { |
| 97 | BOLT_CHECK(!hook, "SimpleVectorLoader doesn't support ValueHook"); |
| 98 | auto& resultRef = *result; |
| 99 | resultRef = loader_(rows); |
| 100 | if (resultRef->size() < resultSize) { |
| 101 | resultRef->resize(resultSize); |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | private: |
| 106 | std::function<VectorPtr(RowSet)> loader_; |