```
DROP TABLE IF EXISTS l;
DROP TABLE IF EXISTS r;
DROP TABLE IF EXISTS nl;
DROP TABLE IF EXISTS nr;
DROP TABLE IF EXISTS l_lc;
DROP TABLE IF EXISTS r_lc;

CREATE TABLE l (x UInt32, lc String) ENGINE = Memory;
CREATE TABLE r (x UInt32, lc String) ENGINE = Memory;
CREATE TABLE nl (x Nullable(UInt32), lc Nullable(String)) ENGINE = Memory;
CREATE TABLE nr (x Nullable(UInt32), lc Nullable(String)) ENGINE = Memory;
CREATE TABLE l_lc (x UInt32, lc LowCardinality(String)) ENGINE = Memory;
CREATE TABLE r_lc (x UInt32, lc LowCardinality(String)) ENGINE = Memory;

INSERT INTO r VALUES (0, 'str'),  (1, 'str_r');
INSERT INTO nr VALUES (0, 'str'),  (1, 'str_r');
INSERT INTO r_lc VALUES (0, 'str'),  (1, 'str_r');

INSERT INTO l VALUES (0, 'str'), (2, 'str_l');
INSERT INTO nl VALUES (0, 'str'), (2, 'str_l');
INSERT INTO l_lc VALUES (0, 'str'), (2, 'str_l');

set join_algorithm = 'partial_merge', join_use_nulls = 1;

SELECT
    toTypeName(r.lc),
    toTypeName(materialize(r.lc)),
    [NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', '', NULL, NULL, NULL, NULL, NULL, NULL],
    r.lc,
    materialize(r.lc),
    toTypeName(l.lc),
    toTypeName(materialize(l.lc)),
    l.lc
FROM l_lc AS l
FULL OUTER JOIN r_lc AS r USING (x)
ORDER BY
    r.lc ASC,
    x ASC NULLS LAST


2021.08.02 16:12:06.344643 [ 9410 ] {7f8da94a-97d7-45b9-8980-9e4e96bacc9a} <Fatal> : Logical error: 'Bad cast from type DB::ColumnNullable to DB::ColumnString'.
2021.08.02 16:12:06.345324 [ 9223 ] {} <Trace> BaseDaemon: Received signal 6
2021.08.02 16:12:06.345677 [ 9901 ] {} <Fatal> BaseDaemon: ########################################
2021.08.02 16:12:06.345977 [ 9901 ] {} <Fatal> BaseDaemon: (version 21.9.1.1, build id: E31A3FA5E2E76CEB) (from thread 9410) (query_id: 7f8da94a-97d7-45b9-8980-9e4e96bacc9a) Received signal Aborted (6)
2021.08.02 16:12:06.346216 [ 9901 ] {} <Fatal> BaseDaemon: 
2021.08.02 16:12:06.346563 [ 9901 ] {} <Fatal> BaseDaemon: Stack trace: 0x7fb46a26318b 0x7fb46a242859 0x7fb46c488f25 0x7fb46c489039 0x7fb467253e8c 0x7fb454fb0830 0x7fb454fa99a0 0x7fb451d71cf1 0x7fb451d71d3a 0x7fb4553b0d29 0x7fb4553b0aec 0x7fb4553b08c3 0x7fb4553b071d 0x7fb4553b065e 0x7fb4553af7ad 0x7fb4553a5751 0x7fb44e095d23 0x7fb44e05bb35 0x7fb44e06d7c7 0x7fb44e09e63e 0x7fb44e841bdc 0x7fb44e841b3f 0x7fb44e841add 0x7fb44e841a9d 0x7fb44e841a75 0x7fb44e841a3d 0x7fb46c53d889 0x7fb46c534175 0x7fb44e840436 0x7fb44e840e19 0x7fb44e83ecc6 0x7fb44e83dfb6 0x7fb44e868a79 0x7fb44e8689a6 0x7fb44e86891d 0x7fb44e8688c1 0x7fb44e8687d2 0x7fb44e8686cc 0x7fb44e8685dd 0x7fb44e86859d 0x7fb44e868575
2021.08.02 16:12:06.349998 [ 9901 ] {} <Fatal> BaseDaemon: 4. /build/glibc-eX1tMB/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51: gsignal @ 0x4618b in /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.31.so
2021.08.02 16:12:06.354972 [ 9901 ] {} <Fatal> BaseDaemon: 5. /build/glibc-eX1tMB/glibc-2.31/stdlib/abort.c:81: __GI_abort @ 0x25859 in /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.31.so
2021.08.02 16:12:06.559429 [ 9901 ] {} <Fatal> BaseDaemon: 6. /home/akuzm/ch2/ch/src/Common/Exception.cpp:53: 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&) @ 0x299f25 in /home/akuzm/ch2/build-clang11/src/libclickhouse_common_iod.so
2021.08.02 16:12:06.743445 [ 9901 ] {} <Fatal> BaseDaemon: 7. /home/akuzm/ch2/ch/src/Common/Exception.cpp:60: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0x29a039 in /home/akuzm/ch2/build-clang11/src/libclickhouse_common_iod.so
2021.08.02 16:12:06.937709 [ 9901 ] {} <Fatal> BaseDaemon: 8. /home/akuzm/ch2/ch/src/Common/assert_cast.h:47: DB::ColumnString const& assert_cast<DB::ColumnString const&, DB::IColumn const&>(DB::IColumn const&) @ 0x44e7e8c in /home/akuzm/ch2/build-clang11/src/AggregateFunctions/libclickhouse_aggregate_functionsd.so
2021.08.02 16:12:07.103318 [ 9901 ] {} <Fatal> BaseDaemon: 9. /home/akuzm/ch2/ch/src/Columns/ColumnString.h:237: DB::ColumnString::compareAt(unsigned long, unsigned long, DB::IColumn const&, int) const @ 0x2bd830 in /home/akuzm/ch2/build-clang11/src/libclickhouse_datatypesd.so
2021.08.02 16:12:07.241908 [ 9901 ] {} <Fatal> BaseDaemon: 10. /home/akuzm/ch2/ch/src/Columns/ColumnUnique.h:420: DB::ColumnUnique<DB::ColumnString>::compareAt(unsigned long, unsigned long, DB::IColumn const&, int) const @ 0x2b69a0 in /home/akuzm/ch2/build-clang11/src/libclickhouse_datatypesd.so
2021.08.02 16:12:07.330117 [ 9901 ] {} <Fatal> BaseDaemon: 11. /home/akuzm/ch2/ch/src/Columns/ColumnLowCardinality.cpp:297: DB::ColumnLowCardinality::compareAtImpl(unsigned long, unsigned long, DB::IColumn const&, int, Collator const*) const @ 0x2c7cf1 in /home/akuzm/ch2/build-clang11/src/libclickhouse_columnsd.so
2021.08.02 16:12:07.417086 [ 9901 ] {} <Fatal> BaseDaemon: 12. /home/akuzm/ch2/ch/src/Columns/ColumnLowCardinality.cpp:302: DB::ColumnLowCardinality::compareAt(unsigned long, unsigned long, DB::IColumn const&, int) const @ 0x2c7d3a in /home/akuzm/ch2/build-clang11/src/libclickhouse_columnsd.so
2021.08.02 16:12:07.586105 [ 9901 ] {} <Fatal> BaseDaemon: 13.1. inlined from /home/akuzm/ch2/ch/src/Core/SortCursor.h:182: DB::SortCursor::greaterAt(DB::SortCursor const&, unsigned long, unsigned long) const
2021.08.02 16:12:07.586263 [ 9901 ] {} <Fatal> BaseDaemon: 13.2. inlined from /home/akuzm/ch2/ch/src/Core/SortCursor.h:149: DB::SortCursorHelper<DB::SortCursor>::greater(DB::SortCursorHelper<DB::SortCursor> const&) const
2021.08.02 16:12:07.586415 [ 9901 ] {} <Fatal> BaseDaemon: 13.3. inlined from /home/akuzm/ch2/ch/src/Core/SortCursor.h:155: DB::SortCursorHelper<DB::SortCursor>::operator<(DB::SortCursorHelper<DB::SortCursor> const&) const
2021.08.02 16:12:07.586501 [ 9901 ] {} <Fatal> BaseDaemon: 13. /home/akuzm/ch2/ch/contrib/libcxx/include/algorithm:715: std::__1::__less<DB::SortCursor, DB::SortCursor>::operator()(DB::SortCursor const&, DB::SortCursor const&) const @ 0x260d29 in /home/akuzm/ch2/build-clang11/src/libclickhouse_datastreamsd.so
2021.08.02 16:12:07.736390 [ 9901 ] {} <Fatal> BaseDaemon: 14. /home/akuzm/ch2/ch/contrib/libcxx/include/algorithm:801: bool std::__1::__debug_less<std::__1::__less<DB::SortCursor, DB::SortCursor> >::operator()<DB::SortCursor, DB::SortCursor>(DB::SortCursor&, DB::SortCursor&) @ 0x260aec in /home/akuzm/ch2/build-clang11/src/libclickhouse_datastreamsd.so
2021.08.02 16:12:07.894255 [ 9901 ] {} <Fatal> BaseDaemon: 15. /home/akuzm/ch2/ch/contrib/libcxx/include/algorithm:4950: void std::__1::__sift_down<std::__1::__debug_less<std::__1::__less<DB::SortCursor, DB::SortCursor> >, std::__1::__wrap_iter<DB::SortCursor*> >(std::__1::__wrap_iter<DB::SortCursor*>, std::__1::__wrap_iter<DB::SortCursor*>, std::__1::__debug_less<std::__1::__less<DB::SortCursor, DB::SortCursor> >, std::__1::iterator_traits<std::__1::__wrap_iter<DB::SortCursor*> >::difference_type, std::__1::__wrap_iter<DB::SortCursor*>) @ 0x2608c3 in /home/akuzm/ch2/build-clang11/src/libclickhouse_datastreamsd.so
2021.08.02 16:12:08.060210 [ 9901 ] {} <Fatal> BaseDaemon: 16. /home/akuzm/ch2/ch/contrib/libcxx/include/algorithm:5020: void std::__1::__make_heap<std::__1::__debug_less<std::__1::__less<DB::SortCursor, DB::SortCursor> >, std::__1::__wrap_iter<DB::SortCursor*> >(std::__1::__wrap_iter<DB::SortCursor*>, std::__1::__wrap_iter<DB::SortCursor*>, std::__1::__debug_less<std::__1::__less<DB::SortCursor, DB::SortCursor> >) @ 0x26071d in /home/akuzm/ch2/build-clang11/src/libclickhouse_datastreamsd.so
2021.08.02 16:12:08.217777 [ 9901 ] {} <Fatal> BaseDaemon: 17. /home/akuzm/ch2/ch/contrib/libcxx/include/algorithm:5034: void std::__1::make_heap<std::__1::__wrap_iter<DB::SortCursor*>, std::__1::__less<DB::SortCursor, DB::SortCursor> >(std::__1::__wrap_iter<DB::SortCursor*>, std::__1::__wrap_iter<DB::SortCursor*>, std::__1::__less<DB::SortCursor, DB::SortCursor>) @ 0x26065e in /home/akuzm/ch2/build-clang11/src/libclickhouse_datastreamsd.so
2021.08.02 16:12:08.377458 [ 9901 ] {} <Fatal> BaseDaemon: 18. /home/akuzm/ch2/ch/contrib/libcxx/include/algorithm:5042: void std::__1::make_heap<std::__1::__wrap_iter<DB::SortCursor*> >(std::__1::__wrap_iter<DB::SortCursor*>, std::__1::__wrap_iter<DB::SortCursor*>) @ 0x25f7ad in /home/akuzm/ch2/build-clang11/src/libclickhouse_datastreamsd.so
2021.08.02 16:12:08.507885 [ 9901 ] {} <Fatal> BaseDaemon: 19. /home/akuzm/ch2/ch/src/Core/SortCursor.h:255: DB::SortingHeap<DB::SortCursor>::SortingHeap<std::__1::vector<DB::SortCursorImpl, std::__1::allocator<DB::SortCursorImpl> > >(std::__1::vector<DB::SortCursorImpl, std::__1::allocator<DB::SortCursorImpl> >&) @ 0x255751 in /home/akuzm/ch2/build-clang11/src/libclickhouse_datastreamsd.so
2021.08.02 16:12:08.635924 [ 9901 ] {} <Fatal> BaseDaemon: 20. /home/akuzm/ch2/ch/src/Processors/Transforms/SortingTransform.cpp:51: DB::MergeSorter::MergeSorter(std::__1::vector<DB::Chunk, std::__1::allocator<DB::Chunk> >, std::__1::vector<DB::SortColumnDescription, std::__1::allocator<DB::SortColumnDescription> >&, unsigned long, unsigned long) @ 0x27bd23 in /home/akuzm/ch2/build-clang11/src/libclickhouse_processors_transformsd.so
2021.08.02 16:12:08.720147 [ 9901 ] {} <Fatal> BaseDaemon: 21. /home/akuzm/ch2/ch/contrib/libcxx/include/memory:2068: std::__1::__unique_if<DB::MergeSorter>::__unique_single std::__1::make_unique<DB::MergeSorter, std::__1::vector<DB::Chunk, std::__1::allocator<DB::Chunk> >, std::__1::vector<DB::SortColumnDescription, std::__1::allocator<DB::SortColumnDescription> >&, unsigned long&, unsigned long&>(std::__1::vector<DB::Chunk, std::__1::allocator<DB::Chunk> >&&, std::__1::vector<DB::SortColumnDescription, std::__1::allocator<DB::SortColumnDescription> >&, unsigned long&, unsigned long&) @ 0x241b35 in /home/akuzm/ch2/build-clang11/src/libclickhouse_processors_transformsd.so
2021.08.02 16:12:08.961613 [ 9901 ] {} <Fatal> BaseDaemon: 22. /home/akuzm/ch2/ch/src/Processors/Transforms/MergeSortingTransform.cpp:229: DB::MergeSortingTransform::generate() @ 0x2537c7 in /home/akuzm/ch2/build-clang11/src/libclickhouse_processors_transformsd.so
2021.08.02 16:12:09.092012 [ 9901 ] {} <Fatal> BaseDaemon: 23. /home/akuzm/ch2/ch/src/Processors/Transforms/SortingTransform.cpp:340: DB::SortingTransform::work() @ 0x28463e in /home/akuzm/ch2/build-clang11/src/libclickhouse_processors_transformsd.so
2021.08.02 16:12:09.439414 [ 9901 ] {} <Fatal> BaseDaemon: 24. /home/akuzm/ch2/ch/src/Processors/Executors/PipelineExecutor.cpp:80: DB::executeJob(DB::IProcessor*) @ 0x98bdc in /home/akuzm/ch2/build-clang11/src/libclickhouse_processors_executorsd.so
2021.08.02 16:12:09.755288 [ 9901 ] {} <Fatal> BaseDaemon: 25. /home/akuzm/ch2/ch/src/Processors/Executors/PipelineExecutor.cpp:97: DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0::operator()() const @ 0x98b3f in /home/akuzm/ch2/build-clang11/src/libclickhouse_processors_executorsd.so
2021.08.02 16:12:10.059211 [ 9901 ] {} <Fatal> BaseDaemon: 26. /home/akuzm/ch2/ch/contrib/libcxx/include/type_traits:3676: decltype(std::__1::forward<DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0&>(fp)()) std::__1::__invoke<DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0&>(DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0&) @ 0x98add in /home/akuzm/ch2/build-clang11/src/libclickhouse_processors_executorsd.so
2021.08.02 16:12:10.355808 [ 9901 ] {} <Fatal> BaseDaemon: 27. /home/akuzm/ch2/ch/contrib/libcxx/include/__functional_base:349: void std::__1::__invoke_void_return_wrapper<void>::__call<DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0&>(DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0&) @ 0x98a9d in /home/akuzm/ch2/build-clang11/src/libclickhouse_processors_executorsd.so
2021.08.02 16:12:10.648865 [ 9901 ] {} <Fatal> BaseDaemon: 28. /home/akuzm/ch2/ch/contrib/libcxx/include/functional:1608: std::__1::__function::__default_alloc_func<DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0, void ()>::operator()() @ 0x98a75 in /home/akuzm/ch2/build-clang11/src/libclickhouse_processors_executorsd.so
2021.08.02 16:12:10.940932 [ 9901 ] {} <Fatal> BaseDaemon: 29. /home/akuzm/ch2/ch/contrib/libcxx/include/functional:2089: void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0, void ()> >(std::__1::__function::__policy_storage const*) @ 0x98a3d in /home/akuzm/ch2/build-clang11/src/libclickhouse_processors_executorsd.so
2021.08.02 16:12:11.043289 [ 9901 ] {} <Fatal> BaseDaemon: 30. /home/akuzm/ch2/ch/contrib/libcxx/include/functional:2221: std::__1::__function::__policy_func<void ()>::operator()() const @ 0x34e889 in /home/akuzm/ch2/build-clang11/src/libclickhouse_common_iod.so
2021.08.02 16:12:11.104885 [ 9901 ] {} <Fatal> BaseDaemon: 31. /home/akuzm/ch2/ch/contrib/libcxx/include/functional:2560: std::__1::function<void ()>::operator()() const @ 0x345175 in /home/akuzm/ch2/build-clang11/src/libclickhouse_common_iod.so
2021.08.02 16:12:11.392269 [ 9901 ] {} <Fatal> BaseDaemon: 32. /home/akuzm/ch2/ch/src/Processors/Executors/PipelineExecutor.cpp:589: DB::PipelineExecutor::executeStepImpl(unsigned long, unsigned long, std::__1::atomic<bool>*) @ 0x97436 in /home/akuzm/ch2/build-clang11/src/libclickhouse_processors_executorsd.so
2021.08.02 16:12:11.675774 [ 9901 ] {} <Fatal> BaseDaemon: 33. /home/akuzm/ch2/ch/src/Processors/Executors/PipelineExecutor.cpp:474: DB::PipelineExecutor::executeSingleThread(unsigned long, unsigned long) @ 0x97e19 in /home/akuzm/ch2/build-clang11/src/libclickhouse_processors_executorsd.so
2021.08.02 16:12:11.949225 [ 9901 ] {} <Fatal> BaseDaemon: 34. /home/akuzm/ch2/ch/src/Processors/Executors/PipelineExecutor.cpp:813: DB::PipelineExecutor::executeImpl(unsigned long) @ 0x95cc6 in /home/akuzm/ch2/build-clang11/src/libclickhouse_processors_executorsd.so
2021.08.02 16:12:12.236730 [ 9901 ] {} <Fatal> BaseDaemon: 35. /home/akuzm/ch2/ch/src/Processors/Executors/PipelineExecutor.cpp:396: DB::PipelineExecutor::execute(unsigned long) @ 0x94fb6 in /home/akuzm/ch2/build-clang11/src/libclickhouse_processors_executorsd.so
2021.08.02 16:12:12.470721 [ 9901 ] {} <Fatal> BaseDaemon: 36. /home/akuzm/ch2/ch/src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:80: DB::threadFunction(DB::PullingAsyncPipelineExecutor::Data&, std::__1::shared_ptr<DB::ThreadGroupStatus>, unsigned long) @ 0xbfa79 in /home/akuzm/ch2/build-clang11/src/libclickhouse_processors_executorsd.so
2021.08.02 16:12:12.707623 [ 9901 ] {} <Fatal> BaseDaemon: 37. /home/akuzm/ch2/ch/src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:108: DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0::operator()() const @ 0xbf9a6 in /home/akuzm/ch2/build-clang11/src/libclickhouse_processors_executorsd.so
2021.08.02 16:12:12.942054 [ 9901 ] {} <Fatal> BaseDaemon: 38. /home/akuzm/ch2/ch/contrib/libcxx/include/type_traits:3682: decltype(std::__1::forward<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&>(fp)()) std::__1::__invoke_constexpr<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&) @ 0xbf91d in /home/akuzm/ch2/build-clang11/src/libclickhouse_processors_executorsd.so
2021.08.02 16:12:13.180678 [ 9901 ] {} <Fatal> BaseDaemon: 39. /home/akuzm/ch2/ch/contrib/libcxx/include/tuple:1415: decltype(auto) std::__1::__apply_tuple_impl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::__1::tuple<>&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::__1::tuple<>&, std::__1::__tuple_indices<>) @ 0xbf8c1 in /home/akuzm/ch2/build-clang11/src/libclickhouse_processors_executorsd.so
2021.08.02 16:12:13.416426 [ 9901 ] {} <Fatal> BaseDaemon: 40. /home/akuzm/ch2/ch/contrib/libcxx/include/tuple:1424: decltype(auto) std::__1::apply<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::__1::tuple<>&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::__1::tuple<>&) @ 0xbf7d2 in /home/akuzm/ch2/build-clang11/src/libclickhouse_processors_executorsd.so
2021.08.02 16:12:13.649078 [ 9901 ] {} <Fatal> BaseDaemon: 41. /home/akuzm/ch2/ch/src/Common/ThreadPool.h:182: ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()::operator()() @ 0xbf6cc in /home/akuzm/ch2/build-clang11/src/libclickhouse_processors_executorsd.so
2021.08.02 16:12:13.883132 [ 9901 ] {} <Fatal> BaseDaemon: 42. /home/akuzm/ch2/ch/contrib/libcxx/include/type_traits:3676: decltype(std::__1::forward<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(fp)()) std::__1::__invoke<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&) @ 0xbf5dd in /home/akuzm/ch2/build-clang11/src/libclickhouse_processors_executorsd.so
2021.08.02 16:12:14.117591 [ 9901 ] {} <Fatal> BaseDaemon: 43. /home/akuzm/ch2/ch/contrib/libcxx/include/__functional_base:349: void std::__1::__invoke_void_return_wrapper<void>::__call<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&...) @ 0xbf59d in /home/akuzm/ch2/build-clang11/src/libclickhouse_processors_executorsd.so
2021.08.02 16:12:14.353091 [ 9901 ] {} <Fatal> BaseDaemon: 44. /home/akuzm/ch2/ch/contrib/libcxx/include/functional:1608: std::__1::__function::__default_alloc_func<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'(), void ()>::operator()() @ 0xbf575 in /home/akuzm/ch2/build-clang11/src/libclickhouse_processors_executorsd.so
2021.08.02 16:12:14.353274 [ 9901 ] {} <Fatal> BaseDaemon: Calculated checksum of the binary: 5AE2644FBBA96BF3D3AF9BCBBD71E560. There is no information about the reference checksum.
```
{
    copyRightRange(right_block, right_columns_to_add, right_columns, range.right_start, range.left_length);
}
template <bool is_all>
bool joinEquals(const Block & left_block, const Block & right_block, const Block & right_columns_to_add,
                MutableColumns & left_columns, MutableColumns & right_columns, Range & range, size_t max_rows [[maybe_unused]])
{
    bool one_more = true;
    if constexpr (is_all)
    {
        size_t range_rows = range.left_length * range.right_length;
        if (range_rows > max_rows)
        {
            
            range.right_length = max_rows / range.left_length;
            if (!range.right_length)
                range.right_length = 1;
            one_more = false;
        }
        size_t left_rows_to_add = range.left_length;
        size_t row_position = range.right_start;
        for (size_t right_row = 0; right_row < range.right_length; ++right_row, ++row_position)