Skip to content

Support optimize_or_like_chain in QueryTreePassManager#42797

Merged
kitaisreal merged 11 commits intomasterfrom
or-like-chain
Jan 18, 2023
Merged

Support optimize_or_like_chain in QueryTreePassManager#42797
kitaisreal merged 11 commits intomasterfrom
or-like-chain

Conversation

@novikd
Copy link
Member

@novikd novikd commented Oct 30, 2022

Changelog category (leave one):

  • Improvement

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Support optimize_or_like_chain in the new infrastructure. Part of #42648.

@robot-clickhouse robot-clickhouse added the pr-improvement Pull request with some product improvements label Oct 30, 2022
@novikd novikd requested a review from kitaisreal October 30, 2022 01:38
@kitaisreal kitaisreal self-assigned this Oct 30, 2022
@novikd novikd marked this pull request as ready for review November 1, 2022 23:15
@novikd novikd requested a review from kitaisreal January 16, 2023 18:57
@kitaisreal kitaisreal merged commit 3a55069 into master Jan 18, 2023
@kitaisreal kitaisreal deleted the or-like-chain branch January 18, 2023 10:09
@CurtizJ
Copy link
Member

CurtizJ commented Jan 18, 2023

In master:

2023.01.19 01:51:35.446382 [ 2288 ] {c9503b85-0289-4cbf-ba78-20091ee0c299} <Fatal> : Logical error: 'Function multiMatchAny(materialize('Привет, World'), ['^hell', '(?i)привет', '(?i)^world']) OR 0 expects 3 arguments but has 2 after running ConvertOrLikeChain pass'.
2023.01.19 01:51:35.447629 [ 7698 ] {} <Fatal> BaseDaemon: ########################################
2023.01.19 01:51:35.447894 [ 7698 ] {} <Fatal> BaseDaemon: (version 22.13.1.1 (official build), build id: 2776E6B20F17DA0990AF836D1372BC39C572A850) (from thread 2288) (query_id: c9503b85-0289-4cbf-ba78-20091ee0c299) (query: EXPLAIN QUERY TREE run_passes=1 SELECT materialize('Привет, World') AS s WHERE (s LIKE 'hell%') OR (s ILIKE '%привет%') OR (s ILIKE 'world%') SETTINGS optimize_or_like_chain = 1, allow_experimental_analyzer = 1;) Received signal Aborted (6)
2023.01.19 01:51:35.448102 [ 7698 ] {} <Fatal> BaseDaemon: 
2023.01.19 01:51:35.448325 [ 7698 ] {} <Fatal> BaseDaemon: Stack trace: 0x7f8f9ccd900b 0x7f8f9ccb8859 0x218fd8fe 0x218fd9f5 0x218fdb45 0x18ddf78a 0x29e569be 0x29e52703 0x29e522d7 0x29e50e36 0x29e52242 0x29e50e53 0x29e5106f 0x29df32c0 0x29df29ab 0x2a4eb86a 0x2a4e7684 0x2be93d46 0x2bea5025 0x30a82319 0x30a82b5c 0x30cd1cd4 0x30ccea7a 0x30ccd85e 0x7f8f9ce90609 0x7f8f9cdb5133
2023.01.19 01:51:35.448552 [ 7698 ] {} <Fatal> BaseDaemon: 4. raise @ 0x7f8f9ccd900b in ?
2023.01.19 01:51:35.448697 [ 7698 ] {} <Fatal> BaseDaemon: 5. abort @ 0x7f8f9ccb8859 in ?
2023.01.19 01:51:35.555329 [ 7698 ] {} <Fatal> BaseDaemon: 6. /build/build_docker/../src/Common/Exception.cpp:41: DB::abortOnFailedAssertion(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) @ 0x218fd8fe in /usr/bin/clickhouse
2023.01.19 01:51:35.718111 [ 7698 ] {} <Fatal> BaseDaemon: 7. /build/build_docker/../src/Common/Exception.cpp:64: DB::handle_error_code(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, int, bool, std::__1::vector<void*, std::__1::allocator<void*>> const&) @ 0x218fd9f5 in /usr/bin/clickhouse
2023.01.19 01:51:35.813753 [ 7698 ] {} <Fatal> BaseDaemon: 8. /build/build_docker/../src/Common/Exception.cpp:78: DB::Exception::Exception(DB::Exception::MessageMasked const&, int, bool) @ 0x218fdb45 in /usr/bin/clickhouse
2023.01.19 01:51:35.916521 [ 7698 ] {} <Fatal> BaseDaemon: 9. /build/build_docker/../src/Common/Exception.h:41: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, int, bool) @ 0x18ddf78a in /usr/bin/clickhouse
2023.01.19 01:51:36.014314 [ 7698 ] {} <Fatal> BaseDaemon: 10. /build/build_docker/../src/Common/Exception.h:50: DB::Exception::Exception<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, unsigned long&, unsigned long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&>(int, fmt::v8::basic_format_string<char, fmt::v8::type_identity<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>::type, fmt::v8::type_identity<unsigned long&>::type, fmt::v8::type_identity<unsigned long>::type, fmt::v8::type_identity<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&>::type>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&&, unsigned long&, unsigned long&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) @ 0x29e569be in /usr/bin/clickhouse
2023.01.19 01:51:36.103565 [ 7698 ] {} <Fatal> BaseDaemon: 11. /build/build_docker/../src/Analyzer/QueryTreePassManager.cpp:91: DB::(anonymous namespace)::ValidationChecker::visitFunction(DB::FunctionNode*) const @ 0x29e52703 in /usr/bin/clickhouse
2023.01.19 01:51:36.192427 [ 7698 ] {} <Fatal> BaseDaemon: 12. /build/build_docker/../src/Analyzer/QueryTreePassManager.cpp:65: DB::(anonymous namespace)::ValidationChecker::visitImpl(std::__1::shared_ptr<DB::IQueryTreeNode>&) const @ 0x29e522d7 in /usr/bin/clickhouse
2023.01.19 01:51:36.290871 [ 7698 ] {} <Fatal> BaseDaemon: 13. /build/build_docker/../src/Analyzer/InDepthQueryTreeVisitor.h:59: DB::InDepthQueryTreeVisitor<DB::(anonymous namespace)::ValidationChecker, false>::visit(std::__1::shared_ptr<DB::IQueryTreeNode>&) @ 0x29e50e36 in /usr/bin/clickhouse
2023.01.19 01:51:36.453229 [ 7698 ] {} <Fatal> BaseDaemon: 14. /build/build_docker/../src/Analyzer/InDepthQueryTreeVisitor.h:76: DB::InDepthQueryTreeVisitor<DB::(anonymous namespace)::ValidationChecker, false>::visitChildren(std::__1::shared_ptr<DB::IQueryTreeNode>&) @ 0x29e52242 in /usr/bin/clickhouse
2023.01.19 01:51:36.579196 [ 7698 ] {} <Fatal> BaseDaemon: 15. /build/build_docker/../src/Analyzer/InDepthQueryTreeVisitor.h:61: DB::InDepthQueryTreeVisitor<DB::(anonymous namespace)::ValidationChecker, false>::visit(std::__1::shared_ptr<DB::IQueryTreeNode>&) @ 0x29e50e53 in /usr/bin/clickhouse
2023.01.19 01:51:36.665043 [ 7698 ] {} <Fatal> BaseDaemon: 16. /build/build_docker/../src/Analyzer/QueryTreePassManager.cpp:174: DB::QueryTreePassManager::run(std::__1::shared_ptr<DB::IQueryTreeNode>, unsigned long) @ 0x29e5106f in /usr/bin/clickhouse
2023.01.19 01:51:36.886154 [ 7698 ] {} <Fatal> BaseDaemon: 17. /build/build_docker/../src/Interpreters/InterpreterExplainQuery.cpp:409: DB::InterpreterExplainQuery::executeImpl() @ 0x29df32c0 in /usr/bin/clickhouse
2023.01.19 01:51:37.112724 [ 7698 ] {} <Fatal> BaseDaemon: 18. /build/build_docker/../src/Interpreters/InterpreterExplainQuery.cpp:87: DB::InterpreterExplainQuery::execute() @ 0x29df29ab in /usr/bin/clickhouse
2023.01.19 01:51:37.363662 [ 7698 ] {} <Fatal> BaseDaemon: 19. /build/build_docker/../src/Interpreters/executeQuery.cpp:709: DB::executeQueryImpl(char const*, char const*, std::__1::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x2a4eb86a in /usr/bin/clickhouse
2023.01.19 01:51:37.792346 [ 7698 ] {} <Fatal> BaseDaemon: 20. /build/build_docker/../src/Interpreters/executeQuery.cpp:1108: DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum) @ 0x2a4e7684 in /usr/bin/clickhouse
2023.01.19 01:51:38.131807 [ 7698 ] {} <Fatal> BaseDaemon: 21. /build/build_docker/../src/Server/TCPHandler.cpp:378: DB::TCPHandler::runImpl() @ 0x2be93d46 in /usr/bin/clickhouse
2023.01.19 01:51:38.452156 [ 7698 ] {} <Fatal> BaseDaemon: 22. /build/build_docker/../src/Server/TCPHandler.cpp:1945: DB::TCPHandler::run() @ 0x2bea5025 in /usr/bin/clickhouse
2023.01.19 01:51:38.477326 [ 7698 ] {} <Fatal> BaseDaemon: 23. /build/build_docker/../contrib/poco/Net/src/TCPServerConnection.cpp:43: Poco::Net::TCPServerConnection::start() @ 0x30a82319 in /usr/bin/clickhouse
2023.01.19 01:51:38.508364 [ 7698 ] {} <Fatal> BaseDaemon: 24. /build/build_docker/../contrib/poco/Net/src/TCPServerDispatcher.cpp:115: Poco::Net::TCPServerDispatcher::run() @ 0x30a82b5c in /usr/bin/clickhouse
2023.01.19 01:51:38.542710 [ 7698 ] {} <Fatal> BaseDaemon: 25. /build/build_docker/../contrib/poco/Foundation/src/ThreadPool.cpp:199: Poco::PooledThread::run() @ 0x30cd1cd4 in /usr/bin/clickhouse
2023.01.19 01:51:38.577910 [ 7698 ] {} <Fatal> BaseDaemon: 26. /build/build_docker/../contrib/poco/Foundation/src/Thread.cpp:56: Poco::(anonymous namespace)::RunnableHolder::run() @ 0x30ccea7a in /usr/bin/clickhouse
2023.01.19 01:51:38.609866 [ 7698 ] {} <Fatal> BaseDaemon: 27. /build/build_docker/../contrib/poco/Foundation/src/Thread_POSIX.cpp:345: Poco::ThreadImpl::runnableEntry(void*) @ 0x30ccd85e in /usr/bin/clickhouse
2023.01.19 01:51:38.610132 [ 7698 ] {} <Fatal> BaseDaemon: 28. ? @ 0x7f8f9ce90609 in ?
2023.01.19 01:51:38.610346 [ 7698 ] {} <Fatal> BaseDaemon: 29. clone @ 0x7f8f9cdb5133 in ?
2023.01.19 01:51:40.264063 [ 7698 ] {} <Fatal> BaseDaemon: Integrity check of the executable successfully passed (checksum: B56E620335DE4B6AC675F7F723E5E063)
2023.01.19 01:51:55.562856 [ 648 ] {} <Fatal> Application: Child process was terminated by signal 6.

@novikd
Copy link
Member Author

novikd commented Jan 18, 2023

@CurtizJ Yes, I'm already working on a fix. I'll merge it soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-improvement Pull request with some product improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants