-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Logical error: 'Block structure mismatch in QueryPipeline stream: different columns #71217
Copy link
Copy link
Closed
Labels
analyzerIssues and pull-requests related to new analyzerIssues and pull-requests related to new analyzerfuzzProblem found by one of the fuzzersProblem found by one of the fuzzers
Description
Query:
SELECT 4
FROM
(
SELECT
1 AS X,
2 AS Y
UNION ALL
SELECT
3,
4
GROUP BY 2
)
WHERE materialize(4)
ORDER BY materialize(4) ASC NULLS LASTError:
2024.10.29 19:06:07.384366 [ 1483414 ] {8c956f77-273a-48cc-8bfd-a6f535929478} <Fatal> : Logical error: 'Block structure mismatch in QueryPipeline stream: different columns:
materialize(4_UInt8) UInt8 UInt8(size = 0)
materialize(4_UInt8) UInt8 Const(size = 0, UInt8(size = 1))'.
2024.10.29 19:06:07.492955 [ 1483414 ] {8c956f77-273a-48cc-8bfd-a6f535929478} <Fatal> : Stack trace (when copying this message, always include the lines below):
0. /home/avogar/ClickHouse/contrib/llvm-project/libcxx/include/exception:141: Poco::Exception::Exception(String const&, int) @ 0x0000000015945d72
1. /home/avogar/ClickHouse/src/Common/Exception.cpp:109: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000000c171479
2. /home/avogar/ClickHouse/src/Common/Exception.h:110: DB::Exception::Exception(PreformattedMessage&&, int) @ 0x0000000006e3820c
3. /home/avogar/ClickHouse/src/Common/Exception.h:128: DB::Exception::Exception<std::basic_string_view<char, std::char_traits<char>>&, String, String>(int, FormatStringHelperImpl<std::type_identity<std::basic_string_view<char, std::char_traits<char>>&>::type, std::type_identity<String>::type, std::type_identity<String>::type>, std::basic_string_view<char, std::char_traits<char>>&, String&&, String&&) @ 0x00000000107fda0b
4. /home/avogar/ClickHouse/src/Core/Block.cpp:36: void DB::onError<void, std::basic_string_view<char, std::char_traits<char>>&, String, String>(int, FormatStringHelperImpl<std::type_identity<std::basic_string_view<char, std::char_traits<char>>&>::type, std::type_identity<String>::type, std::type_identity<String>::type>, std::basic_string_view<char, std::char_traits<char>>&, String&&, String&&) @ 0x00000000107fb88a
5. /home/avogar/ClickHouse/src/Core/Block.cpp:84: void DB::checkColumnStructure<void>(DB::ColumnWithTypeAndName const&, DB::ColumnWithTypeAndName const&, std::basic_string_view<char, std::char_traits<char>>, bool, int) @ 0x00000000107f49de
6. /home/avogar/ClickHouse/src/Core/Block.cpp:128: void DB::checkBlockStructure<void>(DB::Block const&, DB::Block const&, std::basic_string_view<char, std::char_traits<char>>, bool) @ 0x00000000107f9bed
7. /home/avogar/ClickHouse/src/QueryPipeline/Pipe.cpp:614: DB::Pipe::addSimpleTransform(std::function<std::shared_ptr<DB::IProcessor> (DB::Block const&, DB::Pipe::StreamType)> const&)::$_0::operator()(DB::OutputPort*&, DB::Pipe::StreamType) const @ 0x0000000010a3a43c
8. /home/avogar/ClickHouse/src/QueryPipeline/Pipe.cpp:631: DB::Pipe::addSimpleTransform(std::function<std::shared_ptr<DB::IProcessor> (DB::Block const&, DB::Pipe::StreamType)> const&) @ 0x0000000010a3a1cd
9. /home/avogar/ClickHouse/src/Processors/QueryPlan/SortingStep.cpp:311: DB::SortingStep::fullSortStreams(DB::QueryPipelineBuilder&, DB::SortingStep::Settings const&, DB::SortDescription const&, unsigned long, bool) @ 0x00000000133817e1
10. /home/avogar/ClickHouse/src/Processors/QueryPlan/SortingStep.cpp:342: DB::SortingStep::fullSort(DB::QueryPipelineBuilder&, DB::SortDescription const&, unsigned long, bool) @ 0x000000001338195b
11. /home/avogar/ClickHouse/src/Processors/QueryPlan/ITransformingStep.cpp:21: DB::ITransformingStep::updatePipeline(std::vector<std::unique_ptr<DB::QueryPipelineBuilder, std::default_delete<DB::QueryPipelineBuilder>>, std::allocator<std::unique_ptr<DB::QueryPipelineBuilder, std::default_delete<DB::QueryPipelineBuilder>>>>, DB::BuildQueryPipelineSettings const&) @ 0x00000000132ef0a2
12. /home/avogar/ClickHouse/src/Processors/QueryPlan/QueryPlan.cpp:188: DB::QueryPlan::buildQueryPipeline(DB::QueryPlanOptimizationSettings const&, DB::BuildQueryPipelineSettings const&) @ 0x000000001330d4a3
13. /home/avogar/ClickHouse/src/Interpreters/InterpreterSelectQueryAnalyzer.cpp:261: DB::InterpreterSelectQueryAnalyzer::buildQueryPipeline() @ 0x000000001175f851
14. /home/avogar/ClickHouse/src/Interpreters/InterpreterSelectQueryAnalyzer.cpp:228: DB::InterpreterSelectQueryAnalyzer::execute() @ 0x000000001175f5de
15. /home/avogar/ClickHouse/src/Interpreters/executeQuery.cpp:1395: DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x0000000011a36c56
16. /home/avogar/ClickHouse/src/Interpreters/executeQuery.cpp:1562: DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x0000000011a32a3d
17. /home/avogar/ClickHouse/src/Client/LocalConnection.cpp:240: DB::LocalConnection::sendQuery(DB::ConnectionTimeouts const&, String const&, std::unordered_map<String, String, std::hash<String>, std::equal_to<String>, std::allocator<std::pair<String const, String>>> const&, String const&, unsigned long, DB::Settings const*, DB::ClientInfo const*, bool, std::function<void (DB::Progress const&)>) @ 0x0000000012d7042a
18. /home/avogar/ClickHouse/src/Client/ClientBase.cpp:1093: DB::ClientBase::processOrdinaryQuery(String const&, std::shared_ptr<DB::IAST>) @ 0x0000000012d1df4d
19. /home/avogar/ClickHouse/src/Client/ClientBase.cpp:2049: DB::ClientBase::processParsedSingleQuery(String const&, String const&, std::shared_ptr<DB::IAST>, std::optional<bool>, bool) @ 0x0000000012d1c97a
20. /home/avogar/ClickHouse/src/Client/ClientBase.cpp:2382: DB::ClientBase::executeMultiQuery(String const&) @ 0x0000000012d25a83
21. /home/avogar/ClickHouse/src/Client/ClientBase.cpp:2527: DB::ClientBase::processQueryText(String const&) @ 0x0000000012d26766
22. /home/avogar/ClickHouse/src/Client/ClientBase.cpp:2754: DB::ClientBase::runInteractive() @ 0x0000000012d27fab
23. /home/avogar/ClickHouse/programs/local/LocalServer.cpp:0: DB::LocalServer::main(std::vector<String, std::allocator<String>> const&) @ 0x000000000c3894d4
24. /home/avogar/ClickHouse/base/poco/Util/src/Application.cpp:315: Poco::Util::Application::run() @ 0x0000000015a0ce86
25. /home/avogar/ClickHouse/programs/local/LocalServer.cpp:1026: mainEntryClickHouseLocal(int, char**) @ 0x000000000c392c95
26. /home/avogar/ClickHouse/programs/main.cpp:248: main @ 0x0000000006e31c6b
27. ? @ 0x00007908e9629d90
28. ? @ 0x00007908e9629e40
29. _start @ 0x0000000006e3102e
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
analyzerIssues and pull-requests related to new analyzerIssues and pull-requests related to new analyzerfuzzProblem found by one of the fuzzersProblem found by one of the fuzzers