[fix](function) fix result column is nullable type when fast execute (#19889)

This commit is contained in:
YueW
2023-05-24 10:27:50 +08:00
committed by GitHub
parent 384a0c7aa7
commit 08ec5e2eb5
2 changed files with 11 additions and 2 deletions

View File

@ -154,7 +154,15 @@ bool VectorizedFnCall::fast_execute(FunctionContext* context, Block& block,
auto result_column =
block.get_by_name(result_column_name).column->convert_to_full_column_if_const();
block.replace_by_position(result, std::move(result_column));
auto& result_info = block.get_by_position(result);
if (result_info.type->is_nullable()) {
block.replace_by_position(result,
ColumnNullable::create(std::move(result_column),
ColumnUInt8::create(input_rows_count, 0)));
} else {
block.replace_by_position(result, std::move(result_column));
}
return true;
}