MongoDBDictionarySource: preparation [#METR-2944].

This commit is contained in:
Alexey Milovidov 2016-12-20 04:20:59 +03:00
parent 442ff1d3b8
commit 47b75e6c1e

View File

@ -147,7 +147,7 @@ Block MongoDBBlockInputStream::readImpl()
Poco::MongoDB::ResponseMessage & response = cursor->next(*connection);
if (response.cursorID() == 0)
return {};
break;
for (const auto & document : response.documents())
{
@ -166,6 +166,9 @@ Block MongoDBBlockInputStream::readImpl()
}
}
if (num_rows == 0)
return {};
return block;
}