mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-25 03:00:49 +00:00
dbms: More comments. Cleanups. Moved a lot of FunctionsArray code into implementation file. [#METR-19266]
This commit is contained in:
parent
9896c8ce78
commit
3fcf4347cd
File diff suppressed because it is too large
Load Diff
@ -15,9 +15,6 @@
|
||||
#include <DB/Functions/NumberTraits.h>
|
||||
#include <DB/Functions/DataTypeTraits.h>
|
||||
|
||||
/// The following include is needed for the function multiIf.
|
||||
#include <DB/Functions/Conditional/CondException.h>
|
||||
|
||||
namespace DB
|
||||
{
|
||||
|
||||
@ -1458,6 +1455,12 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
namespace Conditional
|
||||
{
|
||||
|
||||
class CondException;
|
||||
|
||||
}
|
||||
|
||||
/// Function multiIf, which generalizes the function if.
|
||||
///
|
||||
@ -1471,6 +1474,9 @@ public:
|
||||
/// - dates with time;
|
||||
/// - strings;
|
||||
/// - arrays of such types.
|
||||
///
|
||||
/// Additionally the arguments, conditions or branches, support nullable types
|
||||
/// and the NULL value.
|
||||
class FunctionMultiIf final : public IFunction
|
||||
{
|
||||
public:
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -6,6 +6,7 @@
|
||||
#include <DB/Functions/Conditional/NumericPerformer.h>
|
||||
#include <DB/Functions/Conditional/StringEvaluator.h>
|
||||
#include <DB/Functions/Conditional/StringArrayEvaluator.h>
|
||||
#include <DB/Functions/Conditional/CondException.h>
|
||||
#include <DB/Columns/ColumnNullable.h>
|
||||
|
||||
namespace DB
|
||||
|
@ -11,6 +11,11 @@ namespace DB
|
||||
namespace
|
||||
{
|
||||
|
||||
/// Suppose a function which has no special support for nullable arguments
|
||||
/// has been called with arguments, one or more of them being nullable.
|
||||
/// Then the method below endows the result, which is nullable, with a null
|
||||
/// byte map that is determined by OR-ing the null byte maps of the nullable
|
||||
/// arguments.
|
||||
void createNullValuesByteMap(Block & block, const ColumnNumbers & args, size_t result)
|
||||
{
|
||||
ColumnNullable & res_col = static_cast<ColumnNullable &>(*block.unsafeGetByPosition(result).column);
|
||||
|
@ -255,7 +255,7 @@ void ExpressionAnalyzer::analyzeAggregation()
|
||||
{
|
||||
NameSet unique_keys;
|
||||
ASTs & group_asts = select_query->group_expression_list->children;
|
||||
for (ssize_t i = 0; i < group_asts.size(); ++i)
|
||||
for (ssize_t i = 0; i < static_cast<ssize_t>(group_asts.size()); ++i)
|
||||
{
|
||||
size_t size = group_asts.size();
|
||||
getRootActions(group_asts[i], true, false, temp_actions);
|
||||
@ -274,7 +274,7 @@ void ExpressionAnalyzer::analyzeAggregation()
|
||||
/// But don't remove last key column if no aggregate functions, otherwise aggregation will not work.
|
||||
if (!aggregate_descriptions.empty() || size > 1)
|
||||
{
|
||||
if (i + 1 < size)
|
||||
if (i + 1 < static_cast<ssize_t>(size))
|
||||
group_asts[i] = std::move(group_asts.back());
|
||||
|
||||
group_asts.pop_back();
|
||||
|
Loading…
Reference in New Issue
Block a user