From af0e256bf9bd81145d51f1a7aa9b4e192d6f7e9f Mon Sep 17 00:00:00 2001 From: LiuNeng <1398775315@qq.com> Date: Tue, 14 Nov 2023 10:36:08 +0000 Subject: [PATCH] fix --- cpp-ch/local-engine/Storages/IO/NativeWriter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp-ch/local-engine/Storages/IO/NativeWriter.cpp b/cpp-ch/local-engine/Storages/IO/NativeWriter.cpp index 2afc3e9d66ba..39a0cb7b579b 100644 --- a/cpp-ch/local-engine/Storages/IO/NativeWriter.cpp +++ b/cpp-ch/local-engine/Storages/IO/NativeWriter.cpp @@ -74,7 +74,7 @@ size_t NativeWriter::write(const DB::Block & block) auto original_type = header.safeGetByPosition(i).type; /// Type String type_name = original_type->getName(); - bool is_agg_opt = WhichDataType(original_type).isAggregateFunction(); + bool is_agg_opt = WhichDataType(original_type).isAggregateFunction() && header.safeGetByPosition(i).column->getDataType() != block.safeGetByPosition(i).column->getDataType(); if (is_agg_opt) {