diff --git a/programs/keeper/Keeper.cpp b/programs/keeper/Keeper.cpp index e477c8f0bdfc..d2ddaa63b455 100644 --- a/programs/keeper/Keeper.cpp +++ b/programs/keeper/Keeper.cpp @@ -71,11 +71,11 @@ int mainEntryClickHouseKeeper(int argc, char ** argv) // // Weak symbols don't work correctly on Darwin // // so we have a stub implementation to avoid linker errors -// void collectCrashLog( -// Int32, UInt64, const String &, const StackTrace &) -// {} +void collectCrashLog( + Int32, UInt64, const String &, const StackTrace &) +{} -// #endif +#endif namespace DB { diff --git a/programs/server/Server.cpp b/programs/server/Server.cpp index 8a5cf66de4fa..6f94e483e202 100644 --- a/programs/server/Server.cpp +++ b/programs/server/Server.cpp @@ -2087,16 +2087,7 @@ void Server::createServers( for (const auto & protocol : protocols) { - std::string prefix = "protocols." + protocol + "."; - std::string port_name = prefix + "port"; - std::string description {" protocol"}; - if (config.has(prefix + "description")) - description = config.getString(prefix + "description"); - - if (!config.has(prefix + "port")) - continue; - - if (!server_type.shouldStart(ServerType::Type::CUSTOM, port_name)) + if (!server_type.shouldStart(ServerType::Type::CUSTOM, protocol)) continue; std::string prefix = "protocols." + protocol + "."; diff --git a/src/Functions/FunctionBinaryArithmetic.h b/src/Functions/FunctionBinaryArithmetic.h index d720674672b8..d028723dcdde 100644 --- a/src/Functions/FunctionBinaryArithmetic.h +++ b/src/Functions/FunctionBinaryArithmetic.h @@ -754,7 +754,6 @@ class FunctionBinaryArithmetic : public IFunction { static constexpr bool is_plus = IsOperation::plus; static constexpr bool is_minus = IsOperation::minus; - static constexpr bool is_modulo = IsOperation::modulo; static constexpr bool is_modulo_or_zero = IsOperation::modulo_or_zero; static constexpr bool is_multiply = IsOperation::multiply; static constexpr bool is_division = IsOperation::division; @@ -1471,9 +1470,7 @@ class FunctionBinaryArithmetic : public IFunction } } - - /// Special case when the function is plus or minus, one of arguments is Date/DateTime and another is Interval. - if (auto function_builder = getFunctionForIntervalArithmetic(arguments[0], arguments[1], context)) + if (auto function_builder = getFunctionForDateTimeArithmetic(arguments[0], arguments[1], context)) { ColumnsWithTypeAndName new_arguments(2); for (size_t i = 0; i < 2; ++i) diff --git a/src/Functions/Kusto/kqlHasAnyIp.cpp b/src/Functions/Kusto/kqlHasAnyIp.cpp index acf3c5e4c270..669fe57682dc 100644 --- a/src/Functions/Kusto/kqlHasAnyIp.cpp +++ b/src/Functions/Kusto/kqlHasAnyIp.cpp @@ -12,7 +12,7 @@ #include #include #include - +#include namespace DB { namespace ErrorCodes diff --git a/src/Server/ServerType.cpp b/src/Server/ServerType.cpp index 94ed7ff9352e..fb052e7d6e62 100644 --- a/src/Server/ServerType.cpp +++ b/src/Server/ServerType.cpp @@ -99,6 +99,7 @@ bool ServerType::shouldStart(Type server_type, const std::string & server_custom bool ServerType::shouldStop(const std::string & port_name) const { Type port_type; + std::string port_custom_name; if (port_name == "http_port") port_type = Type::HTTP; diff --git a/src/TableFunctions/TableFunctionGetSchema.cpp b/src/TableFunctions/TableFunctionGetSchema.cpp index fa9fd5c538e4..21767dc2882d 100644 --- a/src/TableFunctions/TableFunctionGetSchema.cpp +++ b/src/TableFunctions/TableFunctionGetSchema.cpp @@ -13,7 +13,7 @@ namespace ErrorCodes extern const int LOGICAL_ERROR; } -ColumnsDescription TableFunctionGetSchema::getActualTableStructure(ContextPtr) const +ColumnsDescription TableFunctionGetSchema::getActualTableStructure(ContextPtr, bool /*is_insert_query*/) const { return ColumnsDescription{StorageSystemSchema::getNamesAndTypes()}; } @@ -24,7 +24,7 @@ void TableFunctionGetSchema::parseArguments(const ASTPtr &, ContextPtr) } StoragePtr -TableFunctionGetSchema::executeImpl(const ASTPtr & ast_function, ContextPtr, const std::string & table_name, ColumnsDescription) const +TableFunctionGetSchema::executeImpl(const ASTPtr & ast_function, ContextPtr, const std::string & table_name, ColumnsDescription, bool /*is_insert_query*/) const { const auto * function = ast_function->as(); if (!function) diff --git a/src/TableFunctions/TableFunctionGetSchema.h b/src/TableFunctions/TableFunctionGetSchema.h index aaa47dc1a62f..26bd4363c2a1 100644 --- a/src/TableFunctions/TableFunctionGetSchema.h +++ b/src/TableFunctions/TableFunctionGetSchema.h @@ -11,7 +11,7 @@ class TableFunctionGetSchema : public ITableFunction ~TableFunctionGetSchema() override = default; - ColumnsDescription getActualTableStructure(ContextPtr context) const override; + ColumnsDescription getActualTableStructure(ContextPtr context, bool is_insert_query) const override; std::string getName() const override { return name; } bool hasStaticStructure() const override { return true; } @@ -21,7 +21,7 @@ class TableFunctionGetSchema : public ITableFunction const char * getStorageTypeName() const override { return "GetSchema"; } StoragePtr executeImpl( - const ASTPtr & ast_function, ContextPtr context, const std::string & table_name, ColumnsDescription cached_columns) const override; + const ASTPtr & ast_function, ContextPtr context, const std::string & table_name, ColumnsDescription cached_columns, bool is_insert_query) const override; }; class TableFunctionFactory; diff --git a/tests/queries/0_stateless/02366_kql_summarize.sql b/tests/queries/0_stateless/02366_kql_summarize.sql index 111dcee793d3..e35035d574b6 100644 --- a/tests/queries/0_stateless/02366_kql_summarize.sql +++ b/tests/queries/0_stateless/02366_kql_summarize.sql @@ -132,9 +132,9 @@ print '-- variance/variancep/varianceif --'; Customers | summarize variance(Age); Customers | summarize variancep(Age); Customers | summarize varianceif(Age, Age < 30); -Customers | summarize variance(null); -- { clientError Code: 395 } -Customers | summarize variancep(null); -- { clientError Code: 395 } -Customers | summarize varianceif(null, Age < 30); -- { clientError Code: 395 } +Customers | summarize variance(null); -- { serverError 395 } +Customers | summarize variancep(null); -- { serverError 395 } +Customers | summarize varianceif(null, Age < 30); -- { serverError 395 } print '-- arg_max --'; Customers | summarize arg_max(Age); -- { clientError NUMBER_OF_ARGUMENTS_DOESNT_MATCH }