From 04af7a33491775c6be65af35e5062901abda491c Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Tue, 29 Aug 2017 21:51:48 +0300 Subject: [PATCH] Fixed bad translation [#CLICKHOUSE-2]. --- dbms/src/Storages/Distributed/DirectoryMonitor.cpp | 6 ++---- dbms/src/Storages/MergeTree/PKCondition.h | 10 +++++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/dbms/src/Storages/Distributed/DirectoryMonitor.cpp b/dbms/src/Storages/Distributed/DirectoryMonitor.cpp index b531953cde2..03831ba8428 100644 --- a/dbms/src/Storages/Distributed/DirectoryMonitor.cpp +++ b/dbms/src/Storages/Distributed/DirectoryMonitor.cpp @@ -57,16 +57,14 @@ namespace if (!user_pw_end || !colon) throw Exception{ "Shard address '" + address + "' does not match to 'user[:password]@host:port#default_database' pattern", - ErrorCodes::INCORRECT_FILE_NAME - }; + ErrorCodes::INCORRECT_FILE_NAME}; const bool has_pw = colon < user_pw_end; const char * host_end = has_pw ? strchr(user_pw_end + 1, ':') : colon; if (!host_end) throw Exception{ "Shard address '" + address + "' does not contain port", - ErrorCodes::INCORRECT_FILE_NAME - }; + ErrorCodes::INCORRECT_FILE_NAME}; const char * has_db = strchr(address.data(), '#'); const char * port_end = has_db ? has_db : address_end; diff --git a/dbms/src/Storages/MergeTree/PKCondition.h b/dbms/src/Storages/MergeTree/PKCondition.h index 98c1d32cec0..ad4ea02b387 100644 --- a/dbms/src/Storages/MergeTree/PKCondition.h +++ b/dbms/src/Storages/MergeTree/PKCondition.h @@ -20,7 +20,7 @@ class IFunction; using FunctionPtr = std::shared_ptr; -/** Range with open or closed ends; Perhaps unlimited. +/** Range with open or closed ends; possibly unbounded. */ struct Range { @@ -31,12 +31,12 @@ private: public: Field left; /// the left border, if any Field right; /// the right border, if any - bool left_bounded = false; /// limited to the left - bool right_bounded = false; /// limited to the right + bool left_bounded = false; /// bounded at the left + bool right_bounded = false; /// bounded at the right bool left_included = false; /// includes the left border, if any bool right_included = false; /// includes the right border, if any - /// The whole set. + /// The whole unversum. Range() {} /// One point. @@ -148,7 +148,7 @@ public: /// r to the right of me. if (r.left_bounded && right_bounded - && (less(right, r.left) /// ...} {... + && (less(right, r.left) /// ...} {... || ((!right_included || !r.left_included) /// ...) [... or ...] (... && equals(r.left, right)))) return false;