diff --git a/dbms/src/AggregateFunctions/AggregateFunctionSequenceMatch.h b/dbms/src/AggregateFunctions/AggregateFunctionSequenceMatch.h index 3a0940ace33d1d33b88251e8c11616b6c05a9e44..4bca50ee27a427ea5ced55fbc8ded0d0c73d45ee 100644 --- a/dbms/src/AggregateFunctions/AggregateFunctionSequenceMatch.h +++ b/dbms/src/AggregateFunctions/AggregateFunctionSequenceMatch.h @@ -18,7 +18,7 @@ namespace DB namespace ErrorCodes { extern const int TOO_SLOW; - extern const int TOO_LESS_ARGUMENTS_FOR_FUNCTION; + extern const int TOO_FEW_ARGUMENTS_FOR_FUNCTION; extern const int TOO_MANY_ARGUMENTS_FOR_FUNCTION; extern const int SYNTAX_ERROR; extern const int BAD_ARGUMENTS; @@ -146,7 +146,7 @@ public: if (!sufficientArgs(arg_count)) throw Exception{"Aggregate function " + derived().getName() + " requires at least 3 arguments.", - ErrorCodes::TOO_LESS_ARGUMENTS_FOR_FUNCTION}; + ErrorCodes::TOO_FEW_ARGUMENTS_FOR_FUNCTION}; if (arg_count - 1 > AggregateFunctionSequenceMatchData::max_events) throw Exception{"Aggregate function " + derived().getName() + " supports up to " + diff --git a/dbms/src/Common/ErrorCodes.cpp b/dbms/src/Common/ErrorCodes.cpp index 669e7f9c36b815dcd60554112f6c7862fe4b18ad..e5b6028594bfd045c054c7ee6c76e0b404dcf0b5 100644 --- a/dbms/src/Common/ErrorCodes.cpp +++ b/dbms/src/Common/ErrorCodes.cpp @@ -42,7 +42,7 @@ namespace ErrorCodes extern const int ATTEMPT_TO_READ_AFTER_EOF = 32; extern const int CANNOT_READ_ALL_DATA = 33; extern const int TOO_MANY_ARGUMENTS_FOR_FUNCTION = 34; - extern const int TOO_LESS_ARGUMENTS_FOR_FUNCTION = 35; + extern const int TOO_FEW_ARGUMENTS_FOR_FUNCTION = 35; extern const int BAD_ARGUMENTS = 36; extern const int UNKNOWN_ELEMENT_IN_AST = 37; extern const int CANNOT_PARSE_DATE = 38; @@ -285,7 +285,7 @@ namespace ErrorCodes extern const int INCORRECT_INDEX = 282; extern const int UNKNOWN_DISTRIBUTED_PRODUCT_MODE = 283; extern const int UNKNOWN_GLOBAL_SUBQUERIES_METHOD = 284; - extern const int TOO_LESS_LIVE_REPLICAS = 285; + extern const int TOO_FEW_LIVE_REPLICAS = 285; extern const int UNSATISFIED_QUORUM_FOR_PREVIOUS_WRITE = 286; extern const int UNKNOWN_FORMAT_VERSION = 287; extern const int DISTRIBUTED_IN_JOIN_SUBQUERY_DENIED = 288; diff --git a/dbms/src/Functions/FunctionBitTestMany.h b/dbms/src/Functions/FunctionBitTestMany.h index 4dc5dc0522afb159e54d0cd877cc14754ae99696..21b7ebbbaade364afcd0b84bb84cd7bb199a486d 100644 --- a/dbms/src/Functions/FunctionBitTestMany.h +++ b/dbms/src/Functions/FunctionBitTestMany.h @@ -16,7 +16,7 @@ namespace ErrorCodes extern const int ILLEGAL_DIVISION; extern const int ILLEGAL_COLUMN; extern const int ILLEGAL_TYPE_OF_ARGUMENT; - extern const int TOO_LESS_ARGUMENTS_FOR_FUNCTION; + extern const int TOO_FEW_ARGUMENTS_FOR_FUNCTION; } @@ -36,7 +36,7 @@ public: { if (arguments.size() < 2) throw Exception{"Number of arguments for function " + getName() + " doesn't match: passed " - + toString(arguments.size()) + ", should be at least 2.", ErrorCodes::TOO_LESS_ARGUMENTS_FOR_FUNCTION}; + + toString(arguments.size()) + ", should be at least 2.", ErrorCodes::TOO_FEW_ARGUMENTS_FOR_FUNCTION}; const auto & first_arg = arguments.front(); diff --git a/dbms/src/Functions/FunctionsCoding.h b/dbms/src/Functions/FunctionsCoding.h index f505e97d423a4f20919925b68a2824f034b341b2..62ae5ee5bd50533ba5323150f36cbe84147d4ea9 100644 --- a/dbms/src/Functions/FunctionsCoding.h +++ b/dbms/src/Functions/FunctionsCoding.h @@ -30,7 +30,7 @@ namespace DB namespace ErrorCodes { - extern const int TOO_LESS_ARGUMENTS_FOR_FUNCTION; + extern const int TOO_FEW_ARGUMENTS_FOR_FUNCTION; extern const int LOGICAL_ERROR; } diff --git a/dbms/src/Functions/FunctionsConversion.h b/dbms/src/Functions/FunctionsConversion.h index 74428782f9a0e1b4fee3c086fe481624d3218f00..1428fec4f48d76bf0cc4c1aa15ea2196722edfa6 100644 --- a/dbms/src/Functions/FunctionsConversion.h +++ b/dbms/src/Functions/FunctionsConversion.h @@ -57,7 +57,7 @@ namespace ErrorCodes extern const int CANNOT_PARSE_TEXT; extern const int CANNOT_PARSE_UUID; extern const int TOO_LARGE_STRING_SIZE; - extern const int TOO_LESS_ARGUMENTS_FOR_FUNCTION; + extern const int TOO_FEW_ARGUMENTS_FOR_FUNCTION; extern const int LOGICAL_ERROR; extern const int TYPE_MISMATCH; extern const int CANNOT_CONVERT_TYPE; @@ -883,7 +883,7 @@ private: { if (!arguments.size()) throw Exception{"Function " + getName() + " expects at least 1 arguments", - ErrorCodes::TOO_LESS_ARGUMENTS_FOR_FUNCTION}; + ErrorCodes::TOO_FEW_ARGUMENTS_FOR_FUNCTION}; const IDataType * from_type = block.getByPosition(arguments[0]).type.get(); @@ -897,7 +897,7 @@ private: { if (arguments.size() != 2) throw Exception{"Function " + getName() + " expects 2 arguments for Decimal.", - ErrorCodes::TOO_LESS_ARGUMENTS_FOR_FUNCTION}; + ErrorCodes::TOO_FEW_ARGUMENTS_FOR_FUNCTION}; const ColumnWithTypeAndName & scale_column = block.getByPosition(arguments[1]); UInt32 scale = extractToDecimalScale(scale_column); diff --git a/dbms/src/Functions/FunctionsExternalModels.cpp b/dbms/src/Functions/FunctionsExternalModels.cpp index e862794a1da6cd788c98a1e1f95096fe8f92aa53..6afbad3185751c7681d9b467f56e87ebd22c916d 100644 --- a/dbms/src/Functions/FunctionsExternalModels.cpp +++ b/dbms/src/Functions/FunctionsExternalModels.cpp @@ -22,7 +22,7 @@ FunctionPtr FunctionModelEvaluate::create(const Context & context) namespace ErrorCodes { extern const int ILLEGAL_TYPE_OF_ARGUMENT; - extern const int TOO_LESS_ARGUMENTS_FOR_FUNCTION; + extern const int TOO_FEW_ARGUMENTS_FOR_FUNCTION; extern const int ILLEGAL_COLUMN; } @@ -30,7 +30,7 @@ DataTypePtr FunctionModelEvaluate::getReturnTypeImpl(const DataTypes & arguments { if (arguments.size() < 2) throw Exception("Function " + getName() + " expects at least 2 arguments", - ErrorCodes::TOO_LESS_ARGUMENTS_FOR_FUNCTION); + ErrorCodes::TOO_FEW_ARGUMENTS_FOR_FUNCTION); if (!isString(arguments[0])) throw Exception("Illegal type " + arguments[0]->getName() + " of first argument of function " + getName() diff --git a/dbms/src/Functions/FunctionsGeo.cpp b/dbms/src/Functions/FunctionsGeo.cpp index 9841ba03e8586e09c463880e610818dd01731ac5..8e63b7387d259c0e8093b23299981b64945a6180 100644 --- a/dbms/src/Functions/FunctionsGeo.cpp +++ b/dbms/src/Functions/FunctionsGeo.cpp @@ -29,7 +29,7 @@ namespace DB namespace ErrorCodes { - extern const int TOO_LESS_ARGUMENTS_FOR_FUNCTION; + extern const int TOO_FEW_ARGUMENTS_FOR_FUNCTION; extern const int BAD_ARGUMENTS; extern const int ILLEGAL_TYPE_OF_ARGUMENT; } @@ -111,7 +111,7 @@ public: { if (arguments.size() < 2) { - throw Exception("Too few arguments", ErrorCodes::TOO_LESS_ARGUMENTS_FOR_FUNCTION); + throw Exception("Too few arguments", ErrorCodes::TOO_FEW_ARGUMENTS_FOR_FUNCTION); } auto getMsgPrefix = [this](size_t i) { return "Argument " + toString(i + 1) + " for function " + getName(); }; diff --git a/dbms/src/Functions/caseWithExpression.cpp b/dbms/src/Functions/caseWithExpression.cpp index 4af0cdb51613820f135295bdc4bced4692b277f8..e97424e3b7e28c9746a7a05abfe7c210900b54e9 100644 --- a/dbms/src/Functions/caseWithExpression.cpp +++ b/dbms/src/Functions/caseWithExpression.cpp @@ -9,7 +9,7 @@ namespace DB namespace ErrorCodes { - extern const int TOO_LESS_ARGUMENTS_FOR_FUNCTION; + extern const int TOO_FEW_ARGUMENTS_FOR_FUNCTION; } /// Implements the CASE construction when it is @@ -30,7 +30,7 @@ public: { if (!args.size()) throw Exception{"Function " + getName() + " expects at least 1 arguments", - ErrorCodes::TOO_LESS_ARGUMENTS_FOR_FUNCTION}; + ErrorCodes::TOO_FEW_ARGUMENTS_FOR_FUNCTION}; /// See the comments in executeImpl() to understand why we actually have to /// get the return type of a transform function. @@ -48,7 +48,7 @@ public: { if (!args.size()) throw Exception{"Function " + getName() + " expects at least 1 argument", - ErrorCodes::TOO_LESS_ARGUMENTS_FOR_FUNCTION}; + ErrorCodes::TOO_FEW_ARGUMENTS_FOR_FUNCTION}; /// In the following code, we turn the construction: /// CASE expr WHEN val[0] THEN branch[0] ... WHEN val[N-1] then branch[N-1] ELSE branchN diff --git a/dbms/src/Storages/MergeTree/ReplicatedMergeTreeBlockOutputStream.cpp b/dbms/src/Storages/MergeTree/ReplicatedMergeTreeBlockOutputStream.cpp index cdfb71b57267b34ebd1ac8d02460da4dadb043ff..831c2c36448713ac6fc8e4f6995425a536907148 100644 --- a/dbms/src/Storages/MergeTree/ReplicatedMergeTreeBlockOutputStream.cpp +++ b/dbms/src/Storages/MergeTree/ReplicatedMergeTreeBlockOutputStream.cpp @@ -18,7 +18,7 @@ namespace DB namespace ErrorCodes { - extern const int TOO_LESS_LIVE_REPLICAS; + extern const int TOO_FEW_LIVE_REPLICAS; extern const int UNSATISFIED_QUORUM_FOR_PREVIOUS_WRITE; extern const int CHECKSUM_DOESNT_MATCH; extern const int UNEXPECTED_ZOOKEEPER_ERROR; @@ -76,7 +76,7 @@ void ReplicatedMergeTreeBlockOutputStream::checkQuorumPrecondition(zkutil::ZooKe if (leader_election_stat.numChildren < static_cast(quorum)) throw Exception("Number of alive replicas (" + toString(leader_election_stat.numChildren) + ") is less than requested quorum (" + toString(quorum) + ").", - ErrorCodes::TOO_LESS_LIVE_REPLICAS); + ErrorCodes::TOO_FEW_LIVE_REPLICAS); /** Is there a quorum for the last part for which a quorum is needed? * Write of all the parts with the included quorum is linearly ordered.