mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
Rename functions.
This commit is contained in:
parent
872d2a8ad5
commit
85c175883e
@ -171,7 +171,7 @@ Block AddingDefaultsBlockInputStream::readImpl()
|
||||
if (!evaluate_block.columns())
|
||||
evaluate_block.insert({ColumnConst::create(ColumnUInt8::create(1, 0), res.rows()), std::make_shared<DataTypeUInt8>(), "_dummy"});
|
||||
|
||||
auto dag = createFillingMissingDefaultsExpression(evaluate_block, header.getNamesAndTypesList(), columns, context, false);
|
||||
auto dag = evaluateMissingDefaults(evaluate_block, header.getNamesAndTypesList(), columns, context, false);
|
||||
if (dag)
|
||||
{
|
||||
auto actions = std::make_shared<ExpressionActions>(std::move(dag));
|
||||
|
@ -91,7 +91,7 @@ ActionsDAGPtr addMissingDefaults(
|
||||
}
|
||||
|
||||
/// Computes explicitly specified values by default and materialized columns.
|
||||
if (auto dag = createFillingMissingDefaultsExpression(header, required_columns, columns, context))
|
||||
if (auto dag = evaluateMissingDefaults(header, required_columns, columns, context))
|
||||
actions = ActionsDAG::merge(std::move(*actions), std::move(*dag));
|
||||
|
||||
return actions;
|
||||
|
@ -87,7 +87,7 @@ ASTPtr convertRequiredExpressions(Block & block, const NamesAndTypesList & requi
|
||||
return conversion_expr_list;
|
||||
}
|
||||
|
||||
ActionsDAGPtr createFillingMissingDefaultsExpression(
|
||||
ActionsDAGPtr createExpressions(
|
||||
const Block & header,
|
||||
ASTPtr expr_list,
|
||||
bool save_unneeded_columns,
|
||||
@ -125,14 +125,14 @@ void performRequiredConversions(Block & block, const NamesAndTypesList & require
|
||||
if (conversion_expr_list->children.empty())
|
||||
return;
|
||||
|
||||
if (auto dag = createFillingMissingDefaultsExpression(block, conversion_expr_list, true, required_columns, context))
|
||||
if (auto dag = createExpressions(block, conversion_expr_list, true, required_columns, context))
|
||||
{
|
||||
auto expression = std::make_shared<ExpressionActions>(std::move(dag));
|
||||
expression->execute(block);
|
||||
}
|
||||
}
|
||||
|
||||
ActionsDAGPtr createFillingMissingDefaultsExpression(
|
||||
ActionsDAGPtr evaluateMissingDefaults(
|
||||
const Block & header,
|
||||
const NamesAndTypesList & required_columns,
|
||||
const ColumnsDescription & columns,
|
||||
@ -142,7 +142,7 @@ ActionsDAGPtr createFillingMissingDefaultsExpression(
|
||||
return nullptr;
|
||||
|
||||
ASTPtr expr_list = defaultRequiredExpressions(header, required_columns, columns);
|
||||
return createFillingMissingDefaultsExpression(header, expr_list, save_unneeded_columns, required_columns, context);
|
||||
return createExpressions(header, expr_list, save_unneeded_columns, required_columns, context);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -15,9 +15,8 @@ class ColumnsDescription;
|
||||
class ActionsDAG;
|
||||
using ActionsDAGPtr = std::shared_ptr<ActionsDAG>;
|
||||
|
||||
/// Adds missing defaults to block according to required_columns
|
||||
/// using columns description
|
||||
ActionsDAGPtr createFillingMissingDefaultsExpression(
|
||||
/// Create actions which adds missing defaults to block according to required_columns using columns description.
|
||||
ActionsDAGPtr evaluateMissingDefaults(
|
||||
const Block & header,
|
||||
const NamesAndTypesList & required_columns,
|
||||
const ColumnsDescription & columns,
|
||||
|
@ -186,7 +186,7 @@ void IMergeTreeReader::evaluateMissingDefaults(Block additional_columns, Columns
|
||||
additional_columns.insert({res_columns[pos], name_and_type->type, name_and_type->name});
|
||||
}
|
||||
|
||||
auto dag = DB::createFillingMissingDefaultsExpression(
|
||||
auto dag = DB::evaluateMissingDefaults(
|
||||
additional_columns, columns, metadata_snapshot->getColumns(), storage.global_context);
|
||||
if (dag)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user