Skip to content

Commit 61e14cd

Browse files
committed
Kusto-phase3: rebase v23.8.2.7-lts
1 parent 447638d commit 61e14cd

File tree

8 files changed

+15
-26
lines changed

8 files changed

+15
-26
lines changed

programs/keeper/Keeper.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ int mainEntryClickHouseKeeper(int argc, char ** argv)
7171

7272
// // Weak symbols don't work correctly on Darwin
7373
// // so we have a stub implementation to avoid linker errors
74-
// void collectCrashLog(
75-
// Int32, UInt64, const String &, const StackTrace &)
76-
// {}
74+
void collectCrashLog(
75+
Int32, UInt64, const String &, const StackTrace &)
76+
{}
7777

78-
// #endif
78+
#endif
7979

8080
namespace DB
8181
{

programs/server/Server.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2087,16 +2087,7 @@ void Server::createServers(
20872087

20882088
for (const auto & protocol : protocols)
20892089
{
2090-
std::string prefix = "protocols." + protocol + ".";
2091-
std::string port_name = prefix + "port";
2092-
std::string description {"<undefined> protocol"};
2093-
if (config.has(prefix + "description"))
2094-
description = config.getString(prefix + "description");
2095-
2096-
if (!config.has(prefix + "port"))
2097-
continue;
2098-
2099-
if (!server_type.shouldStart(ServerType::Type::CUSTOM, port_name))
2090+
if (!server_type.shouldStart(ServerType::Type::CUSTOM, protocol))
21002091
continue;
21012092

21022093
std::string prefix = "protocols." + protocol + ".";

src/Functions/FunctionBinaryArithmetic.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,6 @@ class FunctionBinaryArithmetic : public IFunction
754754
{
755755
static constexpr bool is_plus = IsOperation<Op>::plus;
756756
static constexpr bool is_minus = IsOperation<Op>::minus;
757-
static constexpr bool is_modulo = IsOperation<Op>::modulo;
758757
static constexpr bool is_modulo_or_zero = IsOperation<Op>::modulo_or_zero;
759758
static constexpr bool is_multiply = IsOperation<Op>::multiply;
760759
static constexpr bool is_division = IsOperation<Op>::division;
@@ -1471,9 +1470,7 @@ class FunctionBinaryArithmetic : public IFunction
14711470
}
14721471
}
14731472

1474-
1475-
/// Special case when the function is plus or minus, one of arguments is Date/DateTime and another is Interval.
1476-
if (auto function_builder = getFunctionForIntervalArithmetic(arguments[0], arguments[1], context))
1473+
if (auto function_builder = getFunctionForDateTimeArithmetic(arguments[0], arguments[1], context))
14771474
{
14781475
ColumnsWithTypeAndName new_arguments(2);
14791476
for (size_t i = 0; i < 2; ++i)

src/Functions/Kusto/kqlHasAnyIp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <Functions/Kusto/KqlFunctionBase.h>
1313
#include <boost/spirit/home/x3.hpp>
1414
#include <format>
15-
15+
#include <numeric>
1616
namespace DB
1717
{
1818
namespace ErrorCodes

src/Server/ServerType.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ bool ServerType::shouldStart(Type server_type, const std::string & server_custom
9999
bool ServerType::shouldStop(const std::string & port_name) const
100100
{
101101
Type port_type;
102+
std::string port_custom_name;
102103

103104
if (port_name == "http_port")
104105
port_type = Type::HTTP;

src/TableFunctions/TableFunctionGetSchema.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace ErrorCodes
1313
extern const int LOGICAL_ERROR;
1414
}
1515

16-
ColumnsDescription TableFunctionGetSchema::getActualTableStructure(ContextPtr) const
16+
ColumnsDescription TableFunctionGetSchema::getActualTableStructure(ContextPtr, bool /*is_insert_query*/) const
1717
{
1818
return ColumnsDescription{StorageSystemSchema::getNamesAndTypes()};
1919
}
@@ -24,7 +24,7 @@ void TableFunctionGetSchema::parseArguments(const ASTPtr &, ContextPtr)
2424
}
2525

2626
StoragePtr
27-
TableFunctionGetSchema::executeImpl(const ASTPtr & ast_function, ContextPtr, const std::string & table_name, ColumnsDescription) const
27+
TableFunctionGetSchema::executeImpl(const ASTPtr & ast_function, ContextPtr, const std::string & table_name, ColumnsDescription, bool /*is_insert_query*/) const
2828
{
2929
const auto * function = ast_function->as<ASTFunction>();
3030
if (!function)

src/TableFunctions/TableFunctionGetSchema.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class TableFunctionGetSchema : public ITableFunction
1111

1212
~TableFunctionGetSchema() override = default;
1313

14-
ColumnsDescription getActualTableStructure(ContextPtr context) const override;
14+
ColumnsDescription getActualTableStructure(ContextPtr context, bool is_insert_query) const override;
1515
std::string getName() const override { return name; }
1616
bool hasStaticStructure() const override { return true; }
1717

@@ -21,7 +21,7 @@ class TableFunctionGetSchema : public ITableFunction
2121
const char * getStorageTypeName() const override { return "GetSchema"; }
2222

2323
StoragePtr executeImpl(
24-
const ASTPtr & ast_function, ContextPtr context, const std::string & table_name, ColumnsDescription cached_columns) const override;
24+
const ASTPtr & ast_function, ContextPtr context, const std::string & table_name, ColumnsDescription cached_columns, bool is_insert_query) const override;
2525
};
2626

2727
class TableFunctionFactory;

tests/queries/0_stateless/02366_kql_summarize.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ print '-- variance/variancep/varianceif --';
132132
Customers | summarize variance(Age);
133133
Customers | summarize variancep(Age);
134134
Customers | summarize varianceif(Age, Age < 30);
135-
Customers | summarize variance(null); -- { clientError Code: 395 }
136-
Customers | summarize variancep(null); -- { clientError Code: 395 }
137-
Customers | summarize varianceif(null, Age < 30); -- { clientError Code: 395 }
135+
Customers | summarize variance(null); -- { serverError 395 }
136+
Customers | summarize variancep(null); -- { serverError 395 }
137+
Customers | summarize varianceif(null, Age < 30); -- { serverError 395 }
138138

139139
print '-- arg_max --';
140140
Customers | summarize arg_max(Age); -- { clientError NUMBER_OF_ARGUMENTS_DOESNT_MATCH }

0 commit comments

Comments
 (0)