From 9921fc6719dfadcdd69e66c62ce4af15eae01994 Mon Sep 17 00:00:00 2001 From: Nikita Vasilev Date: Tue, 5 Feb 2019 21:46:35 +0300 Subject: [PATCH] removed toString --- .../src/Storages/MergeTree/MergeTreeIndices.h | 2 -- .../MergeTree/MergeTreeMinMaxIndex.cpp | 14 ----------- .../Storages/MergeTree/MergeTreeMinMaxIndex.h | 2 -- .../MergeTree/MergeTreeUniqueIndex.cpp | 23 ------------------- .../Storages/MergeTree/MergeTreeUniqueIndex.h | 1 - 5 files changed, 42 deletions(-) diff --git a/dbms/src/Storages/MergeTree/MergeTreeIndices.h b/dbms/src/Storages/MergeTree/MergeTreeIndices.h index 2ccba3195fe..738e0e3d3f7 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeIndices.h +++ b/dbms/src/Storages/MergeTree/MergeTreeIndices.h @@ -31,9 +31,7 @@ struct MergeTreeIndexGranule virtual void serializeBinary(WriteBuffer & ostr) const = 0; virtual void deserializeBinary(ReadBuffer & istr) = 0; - virtual String toString() const = 0; virtual bool empty() const = 0; - virtual void update(const Block & block, size_t * pos, size_t limit) = 0; }; diff --git a/dbms/src/Storages/MergeTree/MergeTreeMinMaxIndex.cpp b/dbms/src/Storages/MergeTree/MergeTreeMinMaxIndex.cpp index d15e86a6e22..93b5a267dc0 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeMinMaxIndex.cpp +++ b/dbms/src/Storages/MergeTree/MergeTreeMinMaxIndex.cpp @@ -52,20 +52,6 @@ void MergeTreeMinMaxGranule::deserializeBinary(ReadBuffer & istr) } } -String MergeTreeMinMaxGranule::toString() const -{ - String res = ""; - - for (size_t i = 0; i < parallelogram.size(); ++i) - { - res += "[" - + applyVisitor(FieldVisitorToString(), parallelogram[i].left) + ", " - + applyVisitor(FieldVisitorToString(), parallelogram[i].right) + "]"; - } - - return res; -} - void MergeTreeMinMaxGranule::update(const Block & block, size_t * pos, size_t limit) { size_t rows_read = std::min(limit, block.rows() - *pos); diff --git a/dbms/src/Storages/MergeTree/MergeTreeMinMaxIndex.h b/dbms/src/Storages/MergeTree/MergeTreeMinMaxIndex.h index ac1ca1787e1..1ba82098035 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeMinMaxIndex.h +++ b/dbms/src/Storages/MergeTree/MergeTreeMinMaxIndex.h @@ -20,9 +20,7 @@ struct MergeTreeMinMaxGranule : public MergeTreeIndexGranule void serializeBinary(WriteBuffer & ostr) const override; void deserializeBinary(ReadBuffer & istr) override; - String toString() const override; bool empty() const override { return parallelogram.empty(); } - void update(const Block & block, size_t * pos, size_t limit) override; ~MergeTreeMinMaxGranule() override = default; diff --git a/dbms/src/Storages/MergeTree/MergeTreeUniqueIndex.cpp b/dbms/src/Storages/MergeTree/MergeTreeUniqueIndex.cpp index 857a55d11c5..d035d5281e9 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeUniqueIndex.cpp +++ b/dbms/src/Storages/MergeTree/MergeTreeUniqueIndex.cpp @@ -80,29 +80,6 @@ void MergeTreeUniqueGranule::deserializeBinary(ReadBuffer & istr) set->insertFromBlock(block); } -String MergeTreeUniqueGranule::toString() const -{ - String res; - - const auto & columns = set->getSetElements(); - for (size_t i = 0; i < index.columns.size(); ++i) - { - const auto & column = columns[i]; - res += " ["; - for (size_t j = 0; j < column->size(); ++j) - { - if (j != 0) - res += ", "; - Field field; - column->get(j, field); - res += applyVisitor(FieldVisitorToString(), field); - } - res += "]\n"; - } - - return res; -} - void MergeTreeUniqueGranule::update(const Block & new_block, size_t * pos, size_t limit) { size_t rows_read = std::min(limit, new_block.rows() - *pos); diff --git a/dbms/src/Storages/MergeTree/MergeTreeUniqueIndex.h b/dbms/src/Storages/MergeTree/MergeTreeUniqueIndex.h index d7ae892496a..cce5becf1ca 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeUniqueIndex.h +++ b/dbms/src/Storages/MergeTree/MergeTreeUniqueIndex.h @@ -21,7 +21,6 @@ struct MergeTreeUniqueGranule : public MergeTreeIndexGranule void serializeBinary(WriteBuffer & ostr) const override; void deserializeBinary(ReadBuffer & istr) override; - String toString() const override; size_t size() const { return set->getTotalRowCount(); } bool empty() const override { return !size(); }