Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion velox/connectors/Connector.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ class IndexSource {
velox::ContinueFuture& future) = 0;
};

virtual std::unique_ptr<LookupResultIterator> lookup(
virtual std::shared_ptr<LookupResultIterator> lookup(
const LookupRequest& request) = 0;

virtual std::unordered_map<std::string, RuntimeCounter> runtimeStats() = 0;
Expand Down
1 change: 0 additions & 1 deletion velox/exec/IndexLookupJoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ IndexLookupJoin::IndexLookupJoin(
expressionEvaluator_(connectorQueryCtx_->expressionEvaluator()),
connector_(connector::getConnector(lookupTableHandle_->connectorId())),
joinNode_{joinNode} {
VELOX_CHECK_EQ(joinNode_->sources()[1], joinNode_->lookupSource());
duplicateJoinKeyCheck(joinNode_->leftKeys());
duplicateJoinKeyCheck(joinNode_->rightKeys());
}
Expand Down
2 changes: 1 addition & 1 deletion velox/exec/IndexLookupJoin.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class IndexLookupJoin : public Operator {
ContinueFuture lookupFuture_{ContinueFuture::makeEmpty()};
// Used to fetch lookup results for each input batch, and reset after
// processing all the outputs from the result.
std::unique_ptr<connector::IndexSource::LookupResultIterator>
std::shared_ptr<connector::IndexSource::LookupResultIterator>
lookupResultIter_;
// Used to store the lookup result fetched from 'lookupResultIter_' for output
// processing. We might split the output result into multiple output batches
Expand Down
4 changes: 2 additions & 2 deletions velox/exec/tests/utils/TestIndexStorageConnector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ TestIndexSource::TestIndexSource(
initOutputProjections();
}

std::unique_ptr<connector::IndexSource::LookupResultIterator>
std::shared_ptr<connector::IndexSource::LookupResultIterator>
TestIndexSource::lookup(const LookupRequest& request) {
const auto numInputRows = request.input->size();
auto& hashTable = tableHandle_->indexTable()->table;
Expand All @@ -67,7 +67,7 @@ TestIndexSource::lookup(const LookupRequest& request) {
auto& rows = lookup->rows;
rows.resize(request.input->size());
std::iota(rows.begin(), rows.end(), 0);
return std::make_unique<ResultIterator>(
return std::make_shared<ResultIterator>(
this->shared_from_this(),
request,
std::move(lookup),
Expand Down
2 changes: 1 addition & 1 deletion velox/exec/tests/utils/TestIndexStorageConnector.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class TestIndexSource : public connector::IndexSource,
connector::ConnectorQueryCtx* connectorQueryCtx,
folly::Executor* executor);

std::unique_ptr<LookupResultIterator> lookup(
std::shared_ptr<LookupResultIterator> lookup(
const LookupRequest& request) override;

std::unordered_map<std::string, RuntimeCounter> runtimeStats() override {
Expand Down