-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Cross join failed with the error 'Logical error: CROSS JOIN has expressions' #9910
Copy link
Copy link
Closed
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasecomp-joinsJOINs end-to-end (planning hooks + runtime join operators/algorithms). Single bucket to avoid pla...JOINs end-to-end (planning hooks + runtime join operators/algorithms). Single bucket to avoid pla...
Description
How to reproduce
- CH 20.3.5.21
SELECT *
FROM numbers(5) AS n1
LEFT JOIN numbers(3) AS n2 ON (n1.number = n2.number), numbers(3) AS n3Error message and stacktrace
Received exception from server (version 20.3.5):
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: Logical error: CROSS JOIN has expressions. Stack trace:
0. Poco::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x1050f0d0 in /usr/bin/clickhouse
1. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x8f3272d in /usr/bin/clickhouse
2. ? @ 0xd278805 in /usr/bin/clickhouse
3. DB::CrossToInnerJoinMatcher::visit(std::__1::shared_ptr<DB::IAST>&, DB::CrossToInnerJoinMatcher::Data&) @ 0xd278083 in /usr/bin/clickhouse
4. DB::InDepthNodeVisitor<DB::CrossToInnerJoinMatcher, true, std::__1::shared_ptr<DB::IAST> >::visit(std::__1::shared_ptr<DB::IAST>&) @ 0xd13274b in /usr/bin/clickhouse
5. DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, std::__1::shared_ptr<DB::IBlockInputStream> const&, std::__1::optional<DB::Pipe>, std::__1::shared_ptr<DB::IStorage> const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0xd124adc in /usr/bin/clickhouse
6. DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0xd1256a9 in /usr/bin/clickhouse
7. DB::InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0xd327e76 in /usr/bin/clickhouse
8. DB::InterpreterSelectWithUnionQuery::getSampleBlock(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&) @ 0xd32895a in /usr/bin/clickhouse
9. ? @ 0xd53d559 in /usr/bin/clickhouse
10. DB::getDatabaseAndTablesWithColumns(std::__1::vector<DB::ASTTableExpression const*, std::__1::allocator<DB::ASTTableExpression const*> > const&, DB::Context const&) @ 0xd5404df in /usr/bin/clickhouse
11. DB::JoinedTables::resolveTables() @ 0xd43b1e5 in /usr/bin/clickhouse
12. DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, std::__1::shared_ptr<DB::IBlockInputStream> const&, std::__1::optional<DB::Pipe>, std::__1::shared_ptr<DB::IStorage> const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0xd124dba in /usr/bin/clickhouse
13. DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0xd1256a9 in /usr/bin/clickhouse
14. DB::InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0xd327e76 in /usr/bin/clickhouse
15. DB::InterpreterFactory::get(std::__1::shared_ptr<DB::IAST>&, DB::Context&, DB::QueryProcessingStage::Enum) @ 0xd077004 in /usr/bin/clickhouse
16. ? @ 0xd535695 in /usr/bin/clickhouse
17. DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool, bool) @ 0xd538471 in /usr/bin/clickhouse
18. DB::TCPHandler::runImpl() @ 0x9015119 in /usr/bin/clickhouse
19. DB::TCPHandler::run() @ 0x9016100 in /usr/bin/clickhouse
20. Poco::Net::TCPServerConnection::start() @ 0xe3867bb in /usr/bin/clickhouse
21. Poco::Net::TCPServerDispatcher::run() @ 0xe386c3d in /usr/bin/clickhouse
22. Poco::PooledThread::run() @ 0x1059d237 in /usr/bin/clickhouse
23. Poco::ThreadImpl::runnableEntry(void*) @ 0x1059903c in /usr/bin/clickhouse
24. ? @ 0x1059a9dd in /usr/bin/clickhouse
25. start_thread @ 0x76db in /lib/x86_64-linux-gnu/libpthread-2.27.so
26. __clone @ 0x12188f in /lib/x86_64-linux-gnu/libc-2.27.soReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasecomp-joinsJOINs end-to-end (planning hooks + runtime join operators/algorithms). Single bucket to avoid pla...JOINs end-to-end (planning hooks + runtime join operators/algorithms). Single bucket to avoid pla...