From eb8d9b5a9786e3ddb495184c98b4a17ca7f8a061 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Wed, 8 Aug 2012 20:12:29 +0000 Subject: [PATCH] dbms: development [#CONV-2944]. --- .../DB/DataStreams/MergingSortedBlockInputStream.h | 1 + dbms/src/DataStreams/MergingSortedBlockInputStream.cpp | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/dbms/include/DB/DataStreams/MergingSortedBlockInputStream.h b/dbms/include/DB/DataStreams/MergingSortedBlockInputStream.h index 14c6369c0ba..fdcad398722 100644 --- a/dbms/include/DB/DataStreams/MergingSortedBlockInputStream.h +++ b/dbms/include/DB/DataStreams/MergingSortedBlockInputStream.h @@ -23,6 +23,7 @@ public: } Block readImpl(); + void readSuffix(); String getName() const { return "MergingSortedBlockInputStream"; } diff --git a/dbms/src/DataStreams/MergingSortedBlockInputStream.cpp b/dbms/src/DataStreams/MergingSortedBlockInputStream.cpp index 0303e1b8b50..4d434b0e7a8 100644 --- a/dbms/src/DataStreams/MergingSortedBlockInputStream.cpp +++ b/dbms/src/DataStreams/MergingSortedBlockInputStream.cpp @@ -107,6 +107,13 @@ Block MergingSortedBlockInputStream::readImpl() return merged_block; } + inputs.clear(); + return merged_block; +} + + +void MergingSortedBlockInputStream::readSuffix() +{ const BlockStreamProfileInfo & profile_info = getInfo(); double seconds = profile_info.work_stopwatch.elapsedSeconds(); LOG_DEBUG(log, std::fixed << std::setprecision(2) @@ -114,9 +121,6 @@ Block MergingSortedBlockInputStream::readImpl() << " in " << seconds << " sec., " << profile_info.rows / seconds << " rows/sec., " << profile_info.bytes / 1000000.0 / seconds << " MiB/sec."); - - inputs.clear(); - return merged_block; } }