Revert "Attempt to fix suboptimal performance when running query with ORDER BY and without GROUP BY to distributed table with very many remote servers [#METR-21408]."

This reverts commit bd47aaeefe38a1c55ed5a225cbda49db0f8ce1dc.
This commit is contained in:
Alexey Milovidov 2016-05-20 23:27:04 +03:00
parent b7a05d0608
commit aae7269dd0
4 changed files with 2 additions and 18 deletions

View File

@ -36,8 +36,9 @@ public:
return res.str();
}
void readPrefixImpl() override
void readPrefix() override
{
children.back()->readPrefix();
next();
started = true;
}

View File

@ -26,10 +26,6 @@ class IProfilingBlockInputStream : public IBlockInputStream
public:
Block read() override final;
/** Реализация по-умолчанию вызывает readPrefix() у всех детей рекурсивно, а затем readPrefixImpl() у себя.
*/
void readPrefix() override;
/** Реализация по-умолчанию вызывает рекурсивно readSuffix() у всех детей, а затем readSuffixImpl() у себя.
* Если этот поток вызывает у детей read() в отдельном потоке, этот поведение обычно неверно:
* readSuffix() у ребенка нельзя вызывать в момент, когда read() того же ребенка выполняется в другом потоке.
@ -186,9 +182,6 @@ protected:
/// Наследники должны реализовать эту функцию.
virtual Block readImpl() = 0;
/// Здесь можно делать предварительную инициализацию.
virtual void readPrefixImpl() {}
/// Здесь необходимо делать финализацию, которая может привести к исключению.
virtual void readSuffixImpl() {}

View File

@ -123,7 +123,6 @@ protected:
Block readImpl() override;
void readSuffixImpl() override;
/// Инициализирует очередь и следующий блок результата.

View File

@ -96,15 +96,6 @@ Block IProfilingBlockInputStream::read()
}
void IProfilingBlockInputStream::readPrefix()
{
for (auto & child : children)
child->readPrefix();
readPrefixImpl();
}
void IProfilingBlockInputStream::readSuffix()
{
for (auto & child : children)