- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
Description
Describe the bug
Related to#89282 ? Easy to reproduce.
How to reproduce
Run Fiddle:https://fiddle.clickhouse.com/4c0877e9-8829-4c33-b83f-182330d7f7b5
Error message and/or stacktrace
Stack trace:
<Fatal> : Logical error: 'Cannot write to finalized buffer'.<Fatal> : Stack trace (when copying this message, always include the lines below):0. contrib/llvm-project/libcxx/include/__exception/exception.h:113: Poco::Exception::Exception(String const&, int) @ 0x00000000252662b21. src/Common/Exception.cpp:129: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000001569c4a92. src/Common/Exception.h:123: DB::Exception::Exception(String&&, int, String, bool) @ 0x000000000d3d3ece3. src/Common/Exception.h:58: DB::Exception::Exception(PreformattedMessage&&, int) @ 0x000000000d3d3a114. src/Common/Exception.h:141: DB::Exception::Exception<>(int, FormatStringHelperImpl<>) @ 0x000000000d3e2c365. src/IO/WriteBuffer.cpp:41: DB::WriteBuffer::write(char const*, unsigned long) @ 0x00000000157a53516. src/DataTypes/Serializations/ISerialization.cpp:218: DB::ISerialization::serializeBinaryBulkWithMultipleStreams(DB::IColumn const&, unsigned long, unsigned long, DB::ISerialization::SerializeBinaryBulkSettings&, std::shared_ptr<DB::ISerialization::SerializeBinaryBulkState>&) const @ 0x000000001a6f23987. src/AggregateFunctions/AggregateFunctionEstimateCompressionRatio.cpp:179: DB::(anonymous namespace)::AggregateFunctionEstimateCompressionRatio::addBatchSinglePlace(unsigned long, unsigned long, char*, DB::IColumn const**, DB::Arena*, long) const @ 0x0000000015e0b97a8. src/Processors/Transforms/WindowTransform.cpp:1034: DB::WindowTransform::updateAggregationState() @ 0x000000001f480fb39. src/Processors/Transforms/WindowTransform.cpp:1234: DB::WindowTransform::appendChunk(DB::Chunk&) @ 0x000000001f481d9b10. src/Processors/Transforms/WindowTransform.cpp:1462: DB::WindowTransform::work() @ 0x000000001f48419511. src/Processors/Executors/ExecutionThreadContext.cpp:53: DB::ExecutionThreadContext::executeTask() @ 0x000000001f10cbf012. src/Processors/Executors/PipelineExecutor.cpp:351: DB::PipelineExecutor::executeStepImpl(unsigned long, DB::IAcquiredSlot*, std::atomic<bool>*) @ 0x000000001f0ff71813. src/Processors/Executors/PipelineExecutor.cpp:279: DB::PipelineExecutor::executeSingleThread(unsigned long, DB::IAcquiredSlot*) @ 0x000000001f0ffd2914. src/Processors/Executors/PipelineExecutor.cpp:602: DB::PipelineExecutor::executeImpl(unsigned long, bool) @ 0x000000001f0fe4a115. src/Processors/Executors/PipelineExecutor.cpp:136: DB::PipelineExecutor::execute(unsigned long, bool) @ 0x000000001f0fdbff16. src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:76: void std::__function::__policy_func<void ()>::__call_func[abi:se210105]<ThreadFromGlobalPoolImpl<true, true>::ThreadFromGlobalPoolImpl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()>(std::__function::__policy_storage const*) @ 0x000000001f114ba217. contrib/llvm-project/libcxx/include/__functional/function.h:508: ? @ 0x00000000157e66f218. contrib/llvm-project/libcxx/include/__type_traits/invoke.h:217: void* std::__thread_proxy[abi:se210105]<std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*>>(void*) @ 0x00000000157ed20019. ? @ 0x00000000000a3d6420. __GI___clone3 @ 0x00000000001373bc