mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-22 01:30:51 +00:00
dbms: fixed error [#CONV-7549].
This commit is contained in:
parent
37b679bb9a
commit
9848a42c82
@ -15,7 +15,5 @@ namespace DB
|
||||
*/
|
||||
void copyData(IBlockInputStream & from, IBlockOutputStream & to);
|
||||
void copyData(IRowInputStream & from, IRowOutputStream & to);
|
||||
void copyData(IBlockInputStream & from, IRowOutputStream & to);
|
||||
void copyData(IRowInputStream & from, IBlockOutputStream & to, const Block & sample);
|
||||
|
||||
}
|
||||
|
@ -15,6 +15,11 @@ void copyData(IBlockInputStream & from, IBlockOutputStream & to)
|
||||
while (Block block = from.read())
|
||||
to.write(block);
|
||||
|
||||
/// Для вывода информации о количестве строк до LIMIT в некоторых форматах.
|
||||
if (const IProfilingBlockInputStream * input = dynamic_cast<const IProfilingBlockInputStream *>(&from))
|
||||
if (input->getInfo().hasAppliedLimit())
|
||||
to.setRowsBeforeLimit(input->getInfo().getRowsBeforeLimit());
|
||||
|
||||
from.readSuffix();
|
||||
to.writeSuffix();
|
||||
}
|
||||
|
@ -581,11 +581,7 @@ BlockInputStreamPtr InterpreterSelectQuery::executeAndFormat(WriteBuffer & buf)
|
||||
|
||||
BlockInputStreamPtr in = execute();
|
||||
BlockOutputStreamPtr out = context.getFormatFactory().getOutput(format_name, buf, sample);
|
||||
|
||||
if (const IProfilingBlockInputStream * input = dynamic_cast<const IProfilingBlockInputStream *>(&*in))
|
||||
if (input->getInfo().hasAppliedLimit())
|
||||
out->setRowsBeforeLimit(input->getInfo().getRowsBeforeLimit());
|
||||
|
||||
|
||||
copyData(*in, *out);
|
||||
|
||||
return in;
|
||||
|
Loading…
Reference in New Issue
Block a user