From acc88af2cbe5f993cf244cf44a0c448c2e76bf37 Mon Sep 17 00:00:00 2001 From: Han Fei Date: Wed, 14 Aug 2024 18:27:20 +0200 Subject: [PATCH] fix style --- src/Storages/MergeTree/KeyCondition.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Storages/MergeTree/KeyCondition.cpp b/src/Storages/MergeTree/KeyCondition.cpp index bad9c2b422c..a297440e8f8 100644 --- a/src/Storages/MergeTree/KeyCondition.cpp +++ b/src/Storages/MergeTree/KeyCondition.cpp @@ -894,8 +894,10 @@ static FieldRef applyFunction(const FunctionBasePtr & func, const DataTypePtr & if (field.isExplicit()) return applyFunctionForField(func, current_type, field); - std::stringstream buf; - buf << "_" << func.get() << "_" << toString(field.column_idx); + WriteBufferFromOwnString buf; + writeText("_", buf); + writePointerHex(func.get(), buf); + writeText("_" + toString(field.column_idx), buf); String result_name = buf.str(); const auto & columns = field.columns; size_t result_idx = columns->size(); @@ -912,6 +914,7 @@ static FieldRef applyFunction(const FunctionBasePtr & func, const DataTypePtr & field.columns->emplace_back(ColumnWithTypeAndName {nullptr, func->getResultType(), result_name}); (*columns)[result_idx].column = func->execute(args, (*columns)[result_idx].type, columns->front().column->size()); } + return {field.columns, field.row_idx, result_idx}; }