From d4ec3bbf70b6e4229bbf0574e54e48870dceb4a6 Mon Sep 17 00:00:00 2001 From: Martijn Bakker Date: Mon, 1 Apr 2019 11:35:37 +0100 Subject: [PATCH] fix style --- dbms/src/Interpreters/Join.cpp | 8 ++++---- dbms/src/Interpreters/Join.h | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dbms/src/Interpreters/Join.cpp b/dbms/src/Interpreters/Join.cpp index 8a17fd8e22c..f19781ca380 100644 --- a/dbms/src/Interpreters/Join.cpp +++ b/dbms/src/Interpreters/Join.cpp @@ -485,7 +485,7 @@ namespace } } -void Join::prepareBlockListStructure(Block& stored_block) +void Join::prepareBlockListStructure(Block & stored_block) { if (isRightOrFull(kind)) { @@ -597,7 +597,7 @@ public: const Block & block_with_columns_to_add, const Block & block, const Block & blocklist_sample, - const ColumnsWithTypeAndName& extras) + const ColumnsWithTypeAndName & extras) { size_t num_columns_to_add = sample_block_with_columns_to_add.columns(); @@ -614,10 +614,10 @@ public: addColumn(src_column); } - for (auto& extra : extras) + for (auto & extra : extras) addColumn(extra); - for (auto& tn : type_name) + for (auto & tn : type_name) right_indexes.push_back(blocklist_sample.getPositionByName(tn.second)); } diff --git a/dbms/src/Interpreters/Join.h b/dbms/src/Interpreters/Join.h index 77a2abacb5a..01bd1335cbd 100644 --- a/dbms/src/Interpreters/Join.h +++ b/dbms/src/Interpreters/Join.h @@ -378,7 +378,6 @@ private: Block sample_block_with_keys; /// Block as it would appear in the BlockList - void prepareBlockListStructure(Block& stored_block); Block blocklist_sample; Poco::Logger * log; @@ -397,6 +396,11 @@ private: void init(Type type_); + /** Take an inserted block and discard everything that does not need to be stored + * Example, remove the keys as they come from the LHS block, but do keep the ASOF timestamps + */ + void prepareBlockListStructure(Block & stored_block); + /// Throw an exception if blocks have different types of key columns. void checkTypesOfKeys(const Block & block_left, const Names & key_names_left, const Block & block_right) const;