``` sql
SELECT [toUInt32(0), 257], mapPopulateSeries([-9223372036854775808, toUInt32(2)], [toUInt32(1023), -1]) AS res
```
https://clickhouse-test-reports.s3.yandex.net/22000/4cbf741e527275ac73e8c475b0a2125ab8a1ca39/fuzzer_ubsan/report.html#fail1

```
2021.03.23 16:20:29.506400 [ 45 ] {a3ab3bb6-6d7f-4ed9-bef7-85a8c3061b7e} <Debug> executeQuery: (from [::1]:47544, using production parser) SELECT [toUInt32(0), 257], mapPopulateSeries([-9223372036854775808, toUInt32(2)], [toUInt32(1023), -1]) AS res
../src/Functions/array/mapPopulateSeries.cpp:193:45: runtime error: signed integer overflow: 2 - -9223372036854775808 cannot be represented in type 'long'
2021.03.23 16:20:29.676959 [ 93 ] {} <Trace> SystemLog (system.metric_log): Flushing system log, 8 entries to flush
2021.03.23 16:20:29.689767 [ 93 ] {} <Debug> DiskLocal: Reserving 1.00 MiB on disk `default`, having unreserved 4.53 TiB.
2021.03.23 16:20:29.694648 [ 93 ] {} <Trace> system.metric_log (f3d5d606-0de0-49d7-be03-d913274ce2d4): Renaming temporary part tmp_insert_202103_294_294_0 to 202103_294_294_0.
2021.03.23 16:20:29.695485 [ 93 ] {} <Trace> SystemLog (system.metric_log): Flushed system log
2021.03.23 16:20:30.000184 [ 115 ] {} <Debug> AsynchronousMetrics: MemoryTracking: was 4.91 GiB, peak 12.31 GiB, will set to 5.02 GiB (RSS), difference: 109.97 MiB
2021.03.23 16:20:30.156798 [ 88 ] {} <Trace> SystemLog (system.query_log): Flushing system log, 253 entries to flush
2021.03.23 16:20:30.166987 [ 88 ] {} <Debug> DiskLocal: Reserving 1.23 MiB on disk `default`, having unreserved 4.53 TiB.
2021.03.23 16:20:30.171470 [ 88 ] {} <Trace> system.query_log (5ce64b59-032a-4b0f-92f1-52332c160820): Renaming temporary part tmp_insert_202103_257_257_0 to 202103_257_257_0.
2021.03.23 16:20:30.171783 [ 88 ] {} <Trace> SystemLog (system.query_log): Flushed system log
    #0 0x17e5bb82 in COW<DB::IColumn>::immutable_ptr<DB::IColumn> DB::FunctionMapPopulateSeries::execute2<long, long>(COW<DB::IColumn>::immutable_ptr<DB::IColumn>, COW<DB::IColumn>::immutable_ptr<DB::IColumn>, COW<DB::IColumn>::immutable_ptr<DB::IColumn>, DB::DataTypeTuple const&) const (/workspace/clickhouse+0x17e5bb82)
    #1 0x17e17123 in COW<DB::IColumn>::immutable_ptr<DB::IColumn> DB::FunctionMapPopulateSeries::execute1<long>(COW<DB::IColumn>::immutable_ptr<DB::IColumn>, COW<DB::IColumn>::immutable_ptr<DB::IColumn>, COW<DB::IColumn>::immutable_ptr<DB::IColumn>, DB::DataTypeTuple const&) const (/workspace/clickhouse+0x17e17123)
    #2 0x17e12687 in DB::FunctionMapPopulateSeries::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const (/workspace/clickhouse+0x17e12687)
    #3 0x125519e4 in DB::IFunction::executeImplDryRun(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const (/workspace/clickhouse+0x125519e4)
    #4 0x12556dc6 in DB::DefaultExecutable::executeDryRun(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const (/workspace/clickhouse+0x12556dc6)
    #5 0x12ffd1ea in DB::ExecutableFunctionAdaptor::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const (/workspace/clickhouse+0x12ffd1ea)
    #6 0x12ffc844 in DB::ExecutableFunctionAdaptor::defaultImplementationForConstantArguments(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const (/workspace/clickhouse+0x12ffc844)
    #7 0x12ffd074 in DB::ExecutableFunctionAdaptor::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const (/workspace/clickhouse+0x12ffd074)
    #8 0x12ffe1ed in DB::ExecutableFunctionAdaptor::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const (/workspace/clickhouse+0x12ffe1ed)
    #9 0x1a0cef35 in DB::ActionsDAG::addFunction(std::__1::shared_ptr<DB::IFunctionOverloadResolver> const&, std::__1::vector<DB::ActionsDAG::Node const*, std::__1::allocator<DB::ActionsDAG::Node const*> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) obj-x86_64-linux-gnu/../src/Interpreters/ActionsDAG.cpp:168:35
    #10 0x1a600af3 in DB::ScopeStack::addFunction(std::__1::shared_ptr<DB::IFunctionOverloadResolver> 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&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.cpp:569:51
    #11 0x1a612d12 in DB::ActionsMatcher::Data::addFunction(std::__1::shared_ptr<DB::IFunctionOverloadResolver> 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&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.h:164:27
    #12 0x1a60be5d in DB::ActionsMatcher::visit(DB::ASTFunction const&, std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.cpp:1049:14
    #13 0x1a60eddf in DB::ActionsMatcher::visit(DB::ASTExpressionList&, std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.cpp
    #14 0x1a5e52d1 in DB::InDepthNodeVisitor<DB::ActionsMatcher, true, std::__1::shared_ptr<DB::IAST> const>::visit(std::__1::shared_ptr<DB::IAST> const&) obj-x86_64-linux-gnu/../src/Interpreters/InDepthNodeVisitor.h:34:13
    #15 0x1a5d21ef in DB::ExpressionAnalyzer::getRootActions(std::__1::shared_ptr<DB::IAST> const&, bool, std::__1::shared_ptr<DB::ActionsDAG>&, bool) obj-x86_64-linux-gnu/../src/Interpreters/ExpressionAnalyzer.cpp:406:48
    #16 0x1a5dafd7 in DB::SelectQueryExpressionAnalyzer::appendSelect(DB::ExpressionActionsChain&, bool) obj-x86_64-linux-gnu/../src/Interpreters/ExpressionAnalyzer.cpp:1119:5
    #17 0x1a5df612 in DB::ExpressionAnalysisResult::ExpressionAnalysisResult(DB::SelectQueryExpressionAnalyzer&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, bool, bool, bool, std::__1::shared_ptr<DB::FilterDAGInfo> const&, DB::Block const&) obj-x86_64-linux-gnu/../src/Interpreters/ExpressionAnalyzer.cpp:1517:24
    #18 0x1a34b774 in DB::InterpreterSelectQuery::getSampleBlockImpl() obj-x86_64-linux-gnu/../src/Interpreters/InterpreterSelectQuery.cpp:596:23
    #19 0x1a34278f in 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&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&)::$_2::operator()(bool) const obj-x86_64-linux-gnu/../src/Interpreters/InterpreterSelectQuery.cpp:475:25
    #20 0x1a33d398 in 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&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&) obj-x86_64-linux-gnu/../src/Interpreters/InterpreterSelectQuery.cpp:478:5
    #21 0x1a33af09 in 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&) obj-x86_64-linux-gnu/../src/Interpreters/InterpreterSelectQuery.cpp:160:7
    #22 0x1a86f157 in std::__1::__unique_if<DB::InterpreterSelectQuery>::__unique_single std::__1::make_unique<DB::InterpreterSelectQuery, std::__1::shared_ptr<DB::IAST> const&, DB::Context&, DB::SelectQueryOptions&, 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&>(std::__1::shared_ptr<DB::IAST> const&, DB::Context&, DB::SelectQueryOptions&, 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&) obj-x86_64-linux-gnu/../contrib/libcxx/include/memory:2068:32
    #23 0x1a86cad3 in DB::InterpreterSelectWithUnionQuery::buildCurrentChildInterpreter(std::__1::shared_ptr<DB::IAST> 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&) obj-x86_64-linux-gnu/../src/Interpreters/InterpreterSelectWithUnionQuery.cpp:211:16
    #24 0x1a86b009 in 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&) obj-x86_64-linux-gnu/../src/Interpreters/InterpreterSelectWithUnionQuery.cpp:133:13
    #25 0x1a2d8d25 in std::__1::__unique_if<DB::InterpreterSelectWithUnionQuery>::__unique_single std::__1::make_unique<DB::InterpreterSelectWithUnionQuery, std::__1::shared_ptr<DB::IAST>&, DB::Context&, DB::SelectQueryOptions const&>(std::__1::shared_ptr<DB::IAST>&, DB::Context&, DB::SelectQueryOptions const&) obj-x86_64-linux-gnu/../contrib/libcxx/include/memory:2068:32
    #26 0x1a2d787a in DB::InterpreterFactory::get(std::__1::shared_ptr<DB::IAST>&, DB::Context&, DB::SelectQueryOptions const&) obj-x86_64-linux-gnu/../src/Interpreters/InterpreterFactory.cpp:110:16
    #27 0x1aab0a39 in DB::executeQueryImpl(char const*, char const*, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool, DB::ReadBuffer*) obj-x86_64-linux-gnu/../src/Interpreters/executeQuery.cpp:520:28
    #28 0x1aaaf884 in DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool) obj-x86_64-linux-gnu/../src/Interpreters/executeQuery.cpp:908:30
    #29 0x1b540aba in DB::TCPHandler::runImpl() obj-x86_64-linux-gnu/../src/Server/TCPHandler.cpp:289:24
    #30 0x1b55a84c in DB::TCPHandler::run() obj-x86_64-linux-gnu/../src/Server/TCPHandler.cpp:1520:9
    #31 0x1c488a5b in Poco::Net::TCPServerConnection::start() obj-x86_64-linux-gnu/../contrib/poco/Net/src/TCPServerConnection.cpp:43:3
    #32 0x1c488eb2 in Poco::Net::TCPServerDispatcher::run() obj-x86_64-linux-gnu/../contrib/poco/Net/src/TCPServerDispatcher.cpp:113:19
    #33 0x1c5664f9 in Poco::PooledThread::run() obj-x86_64-linux-gnu/../contrib/poco/Foundation/src/ThreadPool.cpp:199:14
    #34 0x1c5642fb in Poco::ThreadImpl::runnableEntry(void*) obj-x86_64-linux-gnu/../contrib/poco/Foundation/src/Thread_POSIX.cpp:345:27
    #35 0x7f3e2fd70608 in start_thread /build/glibc-eX1tMB/glibc-2.31/nptl/pthread_create.c:477:8
2021.03.23 16:20:30.780557 [ 44 ] {} <Trace> NuKeeperTCPHandler: Received heartbeat for session #1
    #36 0x7f3e2fc97292 in clone /build/glibc-eX1tMB/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../src/Functions/array/mapPopulateSeries.cpp:193:45 in 
2021.03.23 16:20:30.783729 [ 42 ] {} <Trace> BaseDaemon: Received signal -3
2021.03.23 16:20:30.784179 [ 157 ] {} <Fatal> BaseDaemon: ########################################
2021.03.23 16:20:30.784336 [ 157 ] {} <Fatal> BaseDaemon: (version 21.4.1.6319, build id: D10802B9BD7442DE217698D0CE58A1AB9E846B4C) (from thread 45) (query_id: a3ab3bb6-6d7f-4ed9-bef7-85a8c3061b7e) Received signal Unknown signal (-3)
2021.03.23 16:20:30.784389 [ 157 ] {} <Fatal> BaseDaemon: Sanitizer trap.
2021.03.23 16:20:30.784472 [ 157 ] {} <Fatal> BaseDaemon: Stack trace: 0xe90dff5 0xeb3d416 0xe8d1b56 0xe8dde6d 0x17e5bb83 0x17e17124 0x17e12688 0x125519e5 0x12556dc7 0x12ffd1eb 0x12ffc845 0x12ffd075 0x12ffe1ee 0x1a0cef36 0x1a600af4 0x1a612d13 0x1a60be5e 0x1a60ede0 0x1a5e52d2 0x1a5d21f0 0x1a5dafd8 0x1a5df613 0x1a34b775 0x1a342790 0x1a33d399 0x1a33af0a 0x1a86f158 0x1a86cad4 0x1a86b00a 0x1a2d8d26 0x1a2d787b 0x1aab0a3a
2021.03.23 16:20:30.801710 [ 157 ] {} <Fatal> BaseDaemon: 0.1. inlined from ./obj-x86_64-linux-gnu/../src/Common/StackTrace.cpp:298: StackTrace::tryCapture()
2021.03.23 16:20:30.801739 [ 157 ] {} <Fatal> BaseDaemon: 0. ../src/Common/StackTrace.cpp:259: StackTrace::StackTrace() @ 0xe90dff5 in /workspace/clickhouse
2021.03.23 16:20:30.855747 [ 157 ] {} <Fatal> BaseDaemon: 1. ./obj-x86_64-linux-gnu/../base/daemon/BaseDaemon.cpp:381: sanitizerDeathCallback() @ 0xeb3d416 in /workspace/clickhouse
2021.03.23 16:20:31.686356 [ 157 ] {} <Fatal> BaseDaemon: 2. __sanitizer::Die() @ 0xe8d1b56 in /workspace/clickhouse
2021.03.23 16:20:32.212767 [ 89 ] {} <Trace> SystemLog (system.query_thread_log): Flushing system log, 253 entries to flush
2021.03.23 16:20:32.217324 [ 89 ] {} <Debug> DiskLocal: Reserving 1.00 MiB on disk `default`, having unreserved 4.53 TiB.
2021.03.23 16:20:32.219347 [ 89 ] {} <Trace> system.query_thread_log (ea7d52d9-c34c-4370-a510-c6e017135f8b): Renaming temporary part tmp_insert_202103_263_263_0 to 202103_263_263_0.
2021.03.23 16:20:32.219597 [ 89 ] {} <Trace> SystemLog (system.query_thread_log): Flushed system log
2021.03.23 16:20:32.481638 [ 157 ] {} <Fatal> BaseDaemon: 3. ? @ 0xe8dde6d in /workspace/clickhouse
2021.03.23 16:20:33.280269 [ 157 ] {} <Fatal> BaseDaemon: 4. COW<DB::IColumn>::immutable_ptr<DB::IColumn> DB::FunctionMapPopulateSeries::execute2<long, long>(COW<DB::IColumn>::immutable_ptr<DB::IColumn>, COW<DB::IColumn>::immutable_ptr<DB::IColumn>, COW<DB::IColumn>::immutable_ptr<DB::IColumn>, DB::DataTypeTuple const&) const @ 0x17e5bb83 in /workspace/clickhouse
2021.03.23 16:20:34.078562 [ 157 ] {} <Fatal> BaseDaemon: 5. COW<DB::IColumn>::immutable_ptr<DB::IColumn> DB::FunctionMapPopulateSeries::execute1<long>(COW<DB::IColumn>::immutable_ptr<DB::IColumn>, COW<DB::IColumn>::immutable_ptr<DB::IColumn>, COW<DB::IColumn>::immutable_ptr<DB::IColumn>, DB::DataTypeTuple const&) const @ 0x17e17124 in /workspace/clickhouse
2021.03.23 16:20:34.875836 [ 157 ] {} <Fatal> BaseDaemon: 6. DB::FunctionMapPopulateSeries::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x17e12688 in /workspace/clickhouse
2021.03.23 16:20:35.627986 [ 155 ] {} <Trace> system.text_log (7cb046a8-f4f6-4f64-889f-3b3e59c4e33f): Found 7 old parts to remove.
2021.03.23 16:20:35.628072 [ 155 ] {} <Debug> system.text_log (7cb046a8-f4f6-4f64-889f-3b3e59c4e33f): Removing part from filesystem 202103_214_219_1
2021.03.23 16:20:35.629420 [ 155 ] {} <Debug> system.text_log (7cb046a8-f4f6-4f64-889f-3b3e59c4e33f): Removing part from filesystem 202103_220_225_1
2021.03.23 16:20:35.630778 [ 155 ] {} <Debug> system.text_log (7cb046a8-f4f6-4f64-889f-3b3e59c4e33f): Removing part from filesystem 202103_226_226_0
2021.03.23 16:20:35.631478 [ 155 ] {} <Debug> system.text_log (7cb046a8-f4f6-4f64-889f-3b3e59c4e33f): Removing part from filesystem 202103_227_227_0
2021.03.23 16:20:35.632181 [ 155 ] {} <Debug> system.text_log (7cb046a8-f4f6-4f64-889f-3b3e59c4e33f): Removing part from filesystem 202103_228_228_0
2021.03.23 16:20:35.632880 [ 155 ] {} <Debug> system.text_log (7cb046a8-f4f6-4f64-889f-3b3e59c4e33f): Removing part from filesystem 202103_229_229_0
2021.03.23 16:20:35.633585 [ 155 ] {} <Debug> system.text_log (7cb046a8-f4f6-4f64-889f-3b3e59c4e33f): Removing part from filesystem 202103_230_230_0
2021.03.23 16:20:35.674394 [ 157 ] {} <Fatal> BaseDaemon: 7. DB::IFunction::executeImplDryRun(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x125519e5 in /workspace/clickhouse
2021.03.23 16:20:36.433149 [ 92 ] {} <Debug> DiskLocal: Reserving 1.00 MiB on disk `default`, having unreserved 4.53 TiB.
2021.03.23 16:20:36.434549 [ 92 ] {} <Trace> system.text_log (7cb046a8-f4f6-4f64-889f-3b3e59c4e33f): Renaming temporary part tmp_insert_202103_294_294_0 to 202103_294_294_0.
2021.03.23 16:20:36.434833 [ 107 ] {} <Debug> system.text_log (7cb046a8-f4f6-4f64-889f-3b3e59c4e33f) (MergerMutator): Selected 5 parts from 202103_289_289_0 to 202103_293_293_0
2021.03.23 16:20:36.434943 [ 107 ] {} <Debug> DiskLocal: Reserving 2.09 MiB on disk `default`, having unreserved 4.53 TiB.
2021.03.23 16:20:36.435123 [ 149 ] {} <Debug> system.text_log (7cb046a8-f4f6-4f64-889f-3b3e59c4e33f) (MergerMutator): Merging 5 parts: from 202103_289_289_0 to 202103_293_293_0 into Wide
2021.03.23 16:20:36.435281 [ 149 ] {} <Debug> system.text_log (7cb046a8-f4f6-4f64-889f-3b3e59c4e33f) (MergerMutator): Selected MergeAlgorithm: Horizontal
2021.03.23 16:20:36.435445 [ 149 ] {} <Trace> MergeTreeSequentialSource: Reading 3 marks from part 202103_289_289_0, total 7724 rows starting from the beginning of the part
2021.03.23 16:20:36.436167 [ 149 ] {} <Trace> MergeTreeSequentialSource: Reading 2 marks from part 202103_290_290_0, total 7009 rows starting from the beginning of the part
2021.03.23 16:20:36.436760 [ 149 ] {} <Trace> MergeTreeSequentialSource: Reading 2 marks from part 202103_291_291_0, total 93 rows starting from the beginning of the part
2021.03.23 16:20:36.437003 [ 149 ] {} <Trace> MergeTreeSequentialSource: Reading 2 marks from part 202103_292_292_0, total 61 rows starting from the beginning of the part
2021.03.23 16:20:36.437241 [ 149 ] {} <Trace> MergeTreeSequentialSource: Reading 2 marks from part 202103_293_293_0, total 954 rows starting from the beginning of the part
2021.03.23 16:20:36.476749 [ 157 ] {} <Fatal> BaseDaemon: 8. DB::DefaultExecutable::executeDryRun(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x12556dc7 in /workspace/clickhouse
2021.03.23 16:20:36.522901 [ 149 ] {} <Debug> system.text_log (7cb046a8-f4f6-4f64-889f-3b3e59c4e33f) (MergerMutator): Merge sorted 15841 rows, containing 13 columns (13 merged, 0 gathered) in 0.087757063 sec., 180509.6872943435 rows/sec., 512.25 MiB/sec.
2021.03.23 16:20:36.525593 [ 149 ] {} <Trace> system.text_log (7cb046a8-f4f6-4f64-889f-3b3e59c4e33f): Renaming temporary part tmp_merge_202103_289_293_1 to 202103_289_293_1.
2021.03.23 16:20:36.525771 [ 149 ] {} <Trace> system.text_log (7cb046a8-f4f6-4f64-889f-3b3e59c4e33f) (MergerMutator): Merged 5 parts: from 202103_289_289_0 to 202103_293_293_0
2021.03.23 16:20:36.525806 [ 149 ] {} <Debug> MemoryTracker: Peak memory usage: 103.84 MiB.
2021.03.23 16:20:37.195616 [ 93 ] {} <Trace> SystemLog (system.metric_log): Flushing system log, 7 entries to flush
2021.03.23 16:20:37.203614 [ 93 ] {} <Debug> DiskLocal: Reserving 1.00 MiB on disk `default`, having unreserved 4.53 TiB.
2021.03.23 16:20:37.208196 [ 93 ] {} <Trace> system.metric_log (f3d5d606-0de0-49d7-be03-d913274ce2d4): Renaming temporary part tmp_insert_202103_295_295_0 to 202103_295_295_0.
2021.03.23 16:20:37.209015 [ 93 ] {} <Trace> SystemLog (system.metric_log): Flushed system log
2021.03.23 16:20:37.286108 [ 157 ] {} <Fatal> BaseDaemon: 9. DB::ExecutableFunctionAdaptor::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x12ffd1eb in /workspace/clickhouse
2021.03.23 16:20:38.080868 [ 157 ] {} <Fatal> BaseDaemon: 10. DB::ExecutableFunctionAdaptor::defaultImplementationForConstantArguments(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x12ffc845 in /workspace/clickhouse
2021.03.23 16:20:38.178097 [ 155 ] {} <Trace> system.metric_log (f3d5d606-0de0-49d7-be03-d913274ce2d4): Found 6 old parts to remove.
2021.03.23 16:20:38.178144 [ 155 ] {} <Debug> system.metric_log (f3d5d606-0de0-49d7-be03-d913274ce2d4): Removing part from filesystem 202103_1_226_45
2021.03.23 16:20:38.178467 [ 155 ] {} <Debug> system.metric_log (f3d5d606-0de0-49d7-be03-d913274ce2d4): Removing part from filesystem 202103_227_227_0
2021.03.23 16:20:38.178684 [ 155 ] {} <Debug> system.metric_log (f3d5d606-0de0-49d7-be03-d913274ce2d4): Removing part from filesystem 202103_228_228_0
2021.03.23 16:20:38.178857 [ 155 ] {} <Debug> system.metric_log (f3d5d606-0de0-49d7-be03-d913274ce2d4): Removing part from filesystem 202103_229_229_0
2021.03.23 16:20:38.179020 [ 155 ] {} <Debug> system.metric_log (f3d5d606-0de0-49d7-be03-d913274ce2d4): Removing part from filesystem 202103_230_230_0
2021.03.23 16:20:38.179187 [ 155 ] {} <Debug> system.metric_log (f3d5d606-0de0-49d7-be03-d913274ce2d4): Removing part from filesystem 202103_231_231_0
2021.03.23 16:20:38.876459 [ 157 ] {} <Fatal> BaseDaemon: 11. DB::ExecutableFunctionAdaptor::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x12ffd075 in /workspace/clickhouse
2021.03.23 16:20:39.673018 [ 157 ] {} <Fatal> BaseDaemon: 12. DB::ExecutableFunctionAdaptor::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x12ffe1ee in /workspace/clickhouse
2021.03.23 16:20:39.837409 [ 157 ] {} <Fatal> BaseDaemon: 13.1. inlined from ./obj-x86_64-linux-gnu/../contrib/boost/boost/smart_ptr/intrusive_ptr.hpp:194: boost::intrusive_ptr<DB::IColumn const>::operator*() const
2021.03.23 16:20:39.837455 [ 157 ] {} <Fatal> BaseDaemon: 13. ../src/Interpreters/ActionsDAG.cpp:171: DB::ActionsDAG::addFunction(std::__1::shared_ptr<DB::IFunctionOverloadResolver> const&, std::__1::vector<DB::ActionsDAG::Node const*, std::__1::allocator<DB::ActionsDAG::Node const*> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) @ 0x1a0cef36 in /workspace/clickhouse
2021.03.23 16:20:39.923656 [ 157 ] {} <Fatal> BaseDaemon: 14. ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.cpp:0: DB::ScopeStack::addFunction(std::__1::shared_ptr<DB::IFunctionOverloadResolver> 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&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) @ 0x1a600af4 in /workspace/clickhouse
2021.03.23 16:20:40.017118 [ 157 ] {} <Fatal> BaseDaemon: 15.1. inlined from ./obj-x86_64-linux-gnu/../contrib/libcxx/include/string:1444: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__is_long() const
2021.03.23 16:20:40.017144 [ 157 ] {} <Fatal> BaseDaemon: 15.2. inlined from ../contrib/libcxx/include/string:2218: ~basic_string
2021.03.23 16:20:40.017187 [ 157 ] {} <Fatal> BaseDaemon: 15. ../src/Interpreters/ActionsVisitor.h:164: DB::ActionsMatcher::Data::addFunction(std::__1::shared_ptr<DB::IFunctionOverloadResolver> 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&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) @ 0x1a612d13 in /workspace/clickhouse
2021.03.23 16:20:40.104737 [ 157 ] {} <Fatal> BaseDaemon: 16.1. inlined from ./obj-x86_64-linux-gnu/../contrib/libcxx/include/string:1444: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__is_long() const
2021.03.23 16:20:40.104764 [ 157 ] {} <Fatal> BaseDaemon: 16.2. inlined from ../contrib/libcxx/include/string:2218: ~basic_string
2021.03.23 16:20:40.104805 [ 157 ] {} <Fatal> BaseDaemon: 16. ../src/Interpreters/ActionsVisitor.cpp:1049: DB::ActionsMatcher::visit(DB::ASTFunction const&, std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0x1a60be5e in /workspace/clickhouse
2021.03.23 16:20:40.195513 [ 157 ] {} <Fatal> BaseDaemon: 17. ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.cpp:0: DB::ActionsMatcher::visit(DB::ASTExpressionList&, std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0x1a60ede0 in /workspace/clickhouse
2021.03.23 16:20:40.298738 [ 157 ] {} <Fatal> BaseDaemon: 18. ./obj-x86_64-linux-gnu/../src/Interpreters/InDepthNodeVisitor.h:43: DB::InDepthNodeVisitor<DB::ActionsMatcher, true, std::__1::shared_ptr<DB::IAST> const>::visit(std::__1::shared_ptr<DB::IAST> const&) @ 0x1a5e52d2 in /workspace/clickhouse
2021.03.23 16:20:40.399959 [ 157 ] {} <Fatal> BaseDaemon: 19.1. inlined from ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.h:169: DB::ActionsMatcher::Data::getActions()
2021.03.23 16:20:40.399987 [ 157 ] {} <Fatal> BaseDaemon: 19. ../src/Interpreters/ExpressionAnalyzer.cpp:407: DB::ExpressionAnalyzer::getRootActions(std::__1::shared_ptr<DB::IAST> const&, bool, std::__1::shared_ptr<DB::ActionsDAG>&, bool) @ 0x1a5d21f0 in /workspace/clickhouse
2021.03.23 16:20:40.506046 [ 157 ] {} <Fatal> BaseDaemon: 20. ./obj-x86_64-linux-gnu/../src/Interpreters/ExpressionAnalyzer.cpp:0: DB::SelectQueryExpressionAnalyzer::appendSelect(DB::ExpressionActionsChain&, bool) @ 0x1a5dafd8 in /workspace/clickhouse
2021.03.23 16:20:40.615206 [ 157 ] {} <Fatal> BaseDaemon: 21. ./obj-x86_64-linux-gnu/../src/Interpreters/ExpressionAnalyzer.cpp:0: DB::ExpressionAnalysisResult::ExpressionAnalysisResult(DB::SelectQueryExpressionAnalyzer&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, bool, bool, bool, std::__1::shared_ptr<DB::FilterDAGInfo> const&, DB::Block const&) @ 0x1a5df613 in /workspace/clickhouse
```
}
            }
            static constexpr size_t MAX_ARRAY_SIZE = 1ULL << 30;
            if (static_cast<size_t>(max_key - min_key) > MAX_ARRAY_SIZE)
                throw Exception(ErrorCodes::TOO_LARGE_ARRAY_SIZE, "Too large array size in the result of function {}", getName());
            
            KeyType key;
            for (key = min_key;; ++key)
            {
                to_keys_data.insert(key);
                auto it = res_map.find(key);
                if (it != res_map.end())
                {
                    to_values_data.insert(it->second);
                }
                else
                {
                    to_values_data.insertDefault();
                }
                ++offset;
                if (key == max_key)
                    break;
            }
            to_keys_offsets.push_back(offset);
        }
        to_vals_arr.getOffsets().insert(to_keys_offsets.begin(), to_keys_offsets.end());
        return res_tuple;
    }
    template <typename KeyType>
    ColumnPtr execute1(ColumnPtr key_column, ColumnPtr val_column, ColumnPtr max_key_column, const DataTypeTuple & res_type) const