mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
Do not build compiled functions
This commit is contained in:
parent
3a9311d3ad
commit
a4dd489165
@ -314,7 +314,15 @@ bool PreparedFunctionImpl::defaultImplementationForConstantArguments(Block & blo
|
||||
|
||||
executeWithoutLowCardinalityColumns(temporary_block, temporary_argument_numbers, arguments_size, temporary_block.rows());
|
||||
|
||||
block.getByPosition(result).column = ColumnConst::create(temporary_block.getByPosition(arguments_size).column->cloneResized(1), input_rows_count);
|
||||
ColumnPtr result_column;
|
||||
/// extremely rare case, when we have function with completely const arguments
|
||||
/// but some of them produced by non isDeterministic function
|
||||
if (temporary_block.getByPosition(arguments_size).column->size() > 1)
|
||||
result_column = temporary_block.getByPosition(arguments_size).column->cloneResized(1);
|
||||
else
|
||||
result_column = temporary_block.getByPosition(arguments_size).column;
|
||||
|
||||
block.getByPosition(result).column = ColumnConst::create(result_column, input_rows_count);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -677,7 +677,8 @@ void ExpressionActions::addImpl(ExpressionAction action, Names & new_names)
|
||||
new_names.push_back(action.result_name);
|
||||
new_names.insert(new_names.end(), action.array_joined_columns.begin(), action.array_joined_columns.end());
|
||||
|
||||
if (action.type == ExpressionAction::APPLY_FUNCTION)
|
||||
/// Compiled functions are custom functions and them don't need building
|
||||
if (action.type == ExpressionAction::APPLY_FUNCTION && !action.is_function_compiled)
|
||||
{
|
||||
if (sample_block.has(action.result_name))
|
||||
throw Exception("Column '" + action.result_name + "' already exists", ErrorCodes::DUPLICATE_COLUMN);
|
||||
|
Loading…
Reference in New Issue
Block a user