@@ -157,7 +157,7 @@ VariableToColumnMap IndexScan::computeVariableToColumnMap() const {
157157
158158// ______________________________________________________________________________
159159std::vector<CompressedBlockMetadata> IndexScan::applyFilterBlockMetadata (
160- const std::vector<CompressedBlockMetadata>& blocks) const {
160+ std::vector<CompressedBlockMetadata>& & blocks) const {
161161 std::ranges::for_each (prefilters_, [&blocks](const PrefilterIndexPair& pair) {
162162 pair.first ->evaluate (blocks, pair.second );
163163 });
@@ -276,7 +276,7 @@ ScanSpecificationAsTripleComponent IndexScan::getScanSpecificationTc() const {
276276
277277// _____________________________________________________________________________
278278Permutation::IdTableGenerator IndexScan::getLazyScan (
279- std::vector<CompressedBlockMetadata> blocks) const {
279+ std::vector<CompressedBlockMetadata>&& blocks) const {
280280 // If there is a LIMIT or OFFSET clause that constrains the scan
281281 // (which can happen with an explicit subquery), we cannot use the prefiltered
282282 // blocks, as we currently have no mechanism to include limits and offsets
@@ -344,7 +344,8 @@ IndexScan::lazyScanForJoinOfTwoScans(const IndexScan& s1, const IndexScan& s2) {
344344 auto [blocks1, blocks2] = CompressedRelationReader::getBlocksForJoin (
345345 metaBlocks1.value (), metaBlocks2.value ());
346346
347- std::array result{s1.getLazyScan (blocks1), s2.getLazyScan (blocks2)};
347+ std::array result{s1.getLazyScan (std::move (blocks1)),
348+ s2.getLazyScan (std::move (blocks2))};
348349 result[0 ].details ().numBlocksAll_ = metaBlocks1.value ().blockMetadata_ .size ();
349350 result[1 ].details ().numBlocksAll_ = metaBlocks2.value ().blockMetadata_ .size ();
350351 return result;
@@ -365,7 +366,7 @@ Permutation::IdTableGenerator IndexScan::lazyScanForJoinOfColumnWithScan(
365366 auto blocks = CompressedRelationReader::getBlocksForJoin (joinColumn,
366367 metaBlocks1.value ());
367368
368- auto result = getLazyScan (blocks);
369+ auto result = getLazyScan (std::move ( blocks) );
369370 result.details ().numBlocksAll_ = metaBlocks1.value ().blockMetadata_ .size ();
370371 return result;
371372}
0 commit comments