```
milovidov@milovidov-desktop:~$ ~/work/ClickHouse/build_msan/programs/clickhouse local
ClickHouse local version 22.10.1.1.

milovidov-desktop :) SET empty_result_for_aggregation_by_empty_set = 1, mutations_sync = 1, optimize_functions_to_subcolumns = 1, send_logs_level = 'fatal';

SET empty_result_for_aggregation_by_empty_set = 1, mutations_sync = 1, optimize_functions_to_subcolumns = 1, send_logs_level = 'fatal'

Query id: 175b3ffe-7260-4331-946b-f55687f8c685

Ok.

0 rows in set. Elapsed: 0.004 sec. 

milovidov-desktop :) CREATE TABLE decimal__fuzz_25 (`a` Array(Array(Array(Nullable(UInt16)))), `b` Tuple(Array(Int32), Decimal(9, 7), Float32, FixedString(18), UInt128, Int32), `c` DateTime) ENGINE = Memory

CREATE TABLE decimal__fuzz_25
(
    `a` Array(Array(Array(Nullable(UInt16)))),
    `b` Tuple(Array(Int32), Decimal(9, 7), Float32, FixedString(18), UInt128, Int32),
    `c` DateTime
)
ENGINE = Memory

Query id: 14f8366f-ce3e-4909-a3e0-fecb71e5e273

Ok.

0 rows in set. Elapsed: 0.016 sec. 

milovidov-desktop :) SELECT quantiles(0.5, 1.1754943508222875e-38, 0.0001, -0., 0.0001, -0., 0.0001, 0., 0.5)(c) FROM decimal__fuzz_25 WHERE (-2147483647 AND NULL AND NULL) AND (65537 AND (NULL AND NULL)) WITH TOTALS

SELECT quantiles(0.5, 1.1754943508222875e-38, 0.0001, -0., 0.0001, -0., 0.0001, 0., 0.5)(c)
FROM decimal__fuzz_25
WHERE (-2147483647 AND NULL AND NULL) AND (65537 AND (NULL AND NULL))
    WITH TOTALS

Query id: b4497037-7826-40e7-a530-41bfc6bc05bf

→ Progress: 0.00 rows, 0.00 B (0.00 rows/s., 0.00 B/s.)                                                                                                                             ==708801==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x3f166215 in DateLUTImpl::findIndex(long) const build_msan/./src/Common/DateLUTImpl.h:229:29
    #1 0x3f166215 in DateLUTImpl::toDateTimeComponents(long) const build_msan/./src/Common/DateLUTImpl.h:1174:32
    #2 0x3f166215 in LocalDateTime::init(long, DateLUTImpl const&) build_msan/./src/Common/LocalDateTime.h:34:64
    #3 0x3f166215 in LocalDateTime::LocalDateTime(long, DateLUTImpl const&) build_msan/./src/Common/LocalDateTime.h:65:9
    #4 0x3f166215 in void DB::writeDateTimeText<(char)45, (char)58, (char)32>(long, DB::WriteBuffer&, DateLUTImpl const&) build_msan/./src/IO/WriteHelpers.h:759:84
    #5 0x3f166215 in DB::SerializationDateTime::serializeText(DB::IColumn const&, unsigned long, DB::WriteBuffer&, DB::FormatSettings const&) const build_msan/./src/DataTypes/Serializations/SerializationDateTime.cpp:49:13
    #6 0x3f166d4d in DB::SerializationDateTime::serializeTextQuoted(DB::IColumn const&, unsigned long, DB::WriteBuffer&, DB::FormatSettings const&) const build_msan/./src/DataTypes/Serializations/SerializationDateTime.cpp:84:5
    #7 0x3f1403a2 in DB::SerializationArray::serializeText(DB::IColumn const&, unsigned long, DB::WriteBuffer&, DB::FormatSettings const&) const::$_0::operator()(DB::IColumn const&, unsigned long) const build_msan/./src/DataTypes/Serializations/SerializationArray.cpp:468:21
    #8 0x3f1403a2 in void DB::serializeTextImpl<DB::SerializationArray::serializeText(DB::IColumn const&, unsigned long, DB::WriteBuffer&, DB::FormatSettings const&) const::$_0>(DB::IColumn const&, unsigned long, DB::WriteBuffer&, DB::SerializationArray::serializeText(DB::IColumn const&, unsigned long, DB::WriteBuffer&, DB::FormatSettings const&) const::$_0&&) build_msan/./src/DataTypes/Serializations/SerializationArray.cpp:397:9
    #9 0x3f1403a2 in DB::SerializationArray::serializeText(DB::IColumn const&, unsigned long, DB::WriteBuffer&, DB::FormatSettings const&) const build_msan/./src/DataTypes/Serializations/SerializationArray.cpp:465:5
    #10 0x46a81dd9 in DB::PrettyBlockOutputFormat::calculateWidths(DB::Block const&, DB::Chunk const&, std::__1::vector<DB::PODArray<unsigned long, 4096ul, Allocator<false, false>, 0ul, 0ul>, std::__1::allocator<DB::PODArray<unsigned long, 4096ul, Allocator<false, false>, 0ul, 0ul>>>&, DB::PODArray<unsigned long, 4096ul, Allocator<false, false>, 0ul, 0ul>&, DB::PODArray<unsigned long, 4096ul, Allocator<false, false>, 0ul, 0ul>&) build_msan/./src/Processors/Formats/Impl/PrettyBlockOutputFormat.cpp:65:32
    #11 0x46a961fd in DB::PrettyCompactBlockOutputFormat::writeChunk(DB::Chunk const&, DB::IOutputFormat::PortKind) build_msan/./src/Processors/Formats/Impl/PrettyCompactBlockOutputFormat.cpp:188:5
    #12 0x46a8ab1d in DB::PrettyBlockOutputFormat::write(DB::Chunk, DB::IOutputFormat::PortKind) build_msan/./src/Processors/Formats/Impl/PrettyBlockOutputFormat.cpp:166:5
    #13 0x46a8ab1d in DB::PrettyBlockOutputFormat::consumeTotals(DB::Chunk) build_msan/./src/Processors/Formats/Impl/PrettyBlockOutputFormat.cpp:392:5
    #14 0x4611f86c in DB::IOutputFormat::setTotals(DB::Block const&) build_msan/./src/Processors/Formats/IOutputFormat.h:65:9
    #15 0x460de809 in DB::ClientBase::onTotals(DB::Block&, std::__1::shared_ptr<DB::IAST>) build_msan/./src/Client/ClientBase.cpp:455:20
    #16 0x460de809 in DB::ClientBase::receiveAndProcessPacket(std::__1::shared_ptr<DB::IAST>, bool) build_msan/./src/Client/ClientBase.cpp:898:17
    #17 0x460dd205 in DB::ClientBase::receiveResult(std::__1::shared_ptr<DB::IAST>) build_msan/./src/Client/ClientBase.cpp:853:18
    #18 0x460dbbed in DB::ClientBase::processOrdinaryQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::IAST>) build_msan/./src/Client/ClientBase.cpp:777:13
    #19 0x460d8073 in DB::ClientBase::processParsedSingleQuery(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>> const&, std::__1::shared_ptr<DB::IAST>, std::__1::optional<bool>, bool) build_msan/./src/Client/ClientBase.cpp:1528:13
    #20 0x460d5078 in DB::ClientBase::processTextAsSingleQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) build_msan/./src/Client/ClientBase.cpp:717:9
    #21 0x460fc9ed in DB::ClientBase::processQueryText(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) build_msan/./src/Client/ClientBase.cpp:1908:9
    #22 0x461035e7 in DB::ClientBase::runInteractive() build_msan/./src/Client/ClientBase.cpp:2080:18
    #23 0x27287279 in DB::LocalServer::main(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&) build_msan/./programs/local/LocalServer.cpp
    #24 0x5205e555 in Poco::Util::Application::run() build_msan/./contrib/poco/Util/src/Application.cpp:334:8
    #25 0x2729f183 in mainEntryClickHouseLocal(int, char**) build_msan/./programs/local/LocalServer.cpp:781:20
    #26 0xcde8807 in main build_msan/./programs/main.cpp:482:12
    #27 0x7fd7a4824d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #28 0x7fd7a4824e3f in __libc_start_main csu/../csu/libc-start.c:392:3
    #29 0xcd5c5ed in _start (/home/milovidov/work/ClickHouse/build_msan/programs/clickhouse+0xcd5c5ed) (BuildId: 0ecca0c33cf1bb68daa100c28d244fb4b9431b4f)

  Uninitialized value was stored to memory at
    #0 0xcd915d6 in realloc /home/milovidov/work/llvm-project/compiler-rt/lib/msan/msan_interceptors.cpp:910:3
    #1 0x26d95e2d in Allocator<false, false>::realloc(void*, unsigned long, unsigned long, unsigned long) build_msan/./src/Common/Allocator.h:134:30
    #2 0xce06288 in void DB::PODArrayBase<4ul, 4096ul, Allocator<false, false>, 15ul, 16ul>::resize<>(unsigned long) (/home/milovidov/work/ClickHouse/build_msan/programs/clickhouse+0xce06288) (BuildId: 0ecca0c33cf1bb68daa100c28d244fb4b9431b4f)
    #3 0x2980e00e in DB::AggregateFunctionQuantile<unsigned int, DB::QuantileReservoirSampler<unsigned int>, DB::NameQuantiles, false, void, true>::insertResultInto(char*, DB::IColumn&, DB::Arena*) const build_msan/./src/AggregateFunctions/AggregateFunctionQuantile.h:181:25
    #4 0x4339b130 in DB::ColumnAggregateFunction::convertToValues(COW<DB::IColumn>::mutable_ptr<DB::IColumn>) build_msan/./src/Columns/ColumnAggregateFunction.cpp:168:15
    #5 0x4710cfd0 in DB::finalizeChunk(DB::Chunk&, std::__1::vector<bool, std::__1::allocator<bool>> const&) build_msan/./src/Processors/Transforms/finalizeChunk.cpp:26:18
    #6 0x47072b3c in DB::TotalsHavingTransform::prepareTotals() build_msan/./src/Processors/Transforms/TotalsHavingTransform.cpp:294:5
    #7 0x4707249e in DB::TotalsHavingTransform::work() build_msan/./src/Processors/Transforms/TotalsHavingTransform.cpp:143:9
    #8 0x4664aded in DB::executeJob(DB::ExecutingGraph::Node*, DB::ReadProgressCallback*) build_msan/./src/Processors/Executors/ExecutionThreadContext.cpp:47:26
    #9 0x4664aded in DB::ExecutionThreadContext::executeTask() build_msan/./src/Processors/Executors/ExecutionThreadContext.cpp:92:9
    #10 0x4661117c in DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic<bool>*) build_msan/./src/Processors/Executors/PipelineExecutor.cpp:228:26
    #11 0x46616d6b in DB::PipelineExecutor::executeSingleThread(unsigned long) build_msan/./src/Processors/Executors/PipelineExecutor.cpp:194:5
    #12 0x46616d6b in DB::PipelineExecutor::spawnThreads()::$_0::operator()() const build_msan/./src/Processors/Executors/PipelineExecutor.cpp:315:17
    #13 0x46616d6b in decltype(static_cast<DB::PipelineExecutor::spawnThreads()::$_0&>(fp)()) std::__1::__invoke_constexpr<DB::PipelineExecutor::spawnThreads()::$_0&>(DB::PipelineExecutor::spawnThreads()::$_0&) build_msan/./contrib/libcxx/include/type_traits:3648:23
    #14 0x46616d6b in decltype(auto) std::__1::__apply_tuple_impl<DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&>(DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&, std::__1::__tuple_indices<>) build_msan/./contrib/libcxx/include/tuple:1595:1
    #15 0x46616d6b in decltype(auto) std::__1::apply<DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&>(DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&) build_msan/./contrib/libcxx/include/tuple:1604:1
    #16 0x46616d6b in ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()::operator()() build_msan/./src/Common/ThreadPool.h:193:13
    #17 0x46616d6b in decltype(static_cast<DB::PipelineExecutor::spawnThreads()::$_0>(fp)()) std::__1::__invoke<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&>(DB::PipelineExecutor::spawnThreads()::$_0&&) build_msan/./contrib/libcxx/include/type_traits:3640:23
    #18 0x46616d6b in void std::__1::__invoke_void_return_wrapper<void, true>::__call<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&>(ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&) build_msan/./contrib/libcxx/include/__functional/invoke.h:61:9
    #19 0x46616d6b in std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()>::operator()() build_msan/./contrib/libcxx/include/__functional/function.h:230:12
    #20 0x46616d6b in void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()>>(std::__1::__function::__policy_storage const*) build_msan/./contrib/libcxx/include/__functional/function.h:711:16
    #21 0x2712a290 in std::__1::__function::__policy_func<void ()>::operator()() const build_msan/./contrib/libcxx/include/__functional/function.h:843:16
    #22 0x2712a290 in std::__1::function<void ()>::operator()() const build_msan/./contrib/libcxx/include/__functional/function.h:1184:12
    #23 0x2712a290 in ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) build_msan/./src/Common/ThreadPool.cpp:294:17
    #24 0x27137182 in void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()::operator()() const build_msan/./src/Common/ThreadPool.cpp:144:73
    #25 0x27137182 in decltype(static_cast<void>(fp)()) std::__1::__invoke<void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>(void&&) build_msan/./contrib/libcxx/include/type_traits:3640:23
    #26 0x27137182 in void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>(std::__1::tuple<void, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>&, std::__1::__tuple_indices<>) build_msan/./contrib/libcxx/include/thread:282:5
    #27 0x27137182 in void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>>(void*) build_msan/./contrib/libcxx/include/thread:293:5
    #28 0x7fd7a488fb42 in start_thread nptl/pthread_create.c:442:8

  Uninitialized value was created by a heap allocation
    #0 0xcd91890 in malloc /home/milovidov/work/llvm-project/compiler-rt/lib/msan/msan_interceptors.cpp:922:3
    #1 0x26d949ec in Allocator<false, false>::allocNoTrack(unsigned long, unsigned long) build_msan/./src/Common/Allocator.h:227:27
    #2 0xce070a4 in void DB::PODArrayBase<4ul, 4096ul, Allocator<false, false>, 15ul, 16ul>::alloc<>(unsigned long) (/home/milovidov/work/ClickHouse/build_msan/programs/clickhouse+0xce070a4) (BuildId: 0ecca0c33cf1bb68daa100c28d244fb4b9431b4f)
    #3 0x43b5bda1 in void DB::PODArrayBase<4ul, 4096ul, Allocator<false, false>, 15ul, 16ul>::realloc<>(unsigned long) build_msan/./src/Common/PODArray.h:159:13
    #4 0x43b5bda1 in void DB::PODArrayBase<4ul, 4096ul, Allocator<false, false>, 15ul, 16ul>::reserve<>(unsigned long) build_msan/./src/Common/PODArray.h:238:13
    #5 0x43b5bda1 in DB::ColumnVector<unsigned int>::reserve(unsigned long) build_msan/./src/Columns/ColumnVector.h:251:14
    #6 0x433c81bc in DB::ColumnArray::reserve(unsigned long) build_msan/./src/Columns/ColumnArray.cpp:426:15
    #7 0x4339a624 in DB::ColumnAggregateFunction::convertToValues(COW<DB::IColumn>::mutable_ptr<DB::IColumn>) build_msan/./src/Columns/ColumnAggregateFunction.cpp:150:10
    #8 0x4710cfd0 in DB::finalizeChunk(DB::Chunk&, std::__1::vector<bool, std::__1::allocator<bool>> const&) build_msan/./src/Processors/Transforms/finalizeChunk.cpp:26:18
    #9 0x47072b3c in DB::TotalsHavingTransform::prepareTotals() build_msan/./src/Processors/Transforms/TotalsHavingTransform.cpp:294:5
    #10 0x4707249e in DB::TotalsHavingTransform::work() build_msan/./src/Processors/Transforms/TotalsHavingTransform.cpp:143:9
    #11 0x4664aded in DB::executeJob(DB::ExecutingGraph::Node*, DB::ReadProgressCallback*) build_msan/./src/Processors/Executors/ExecutionThreadContext.cpp:47:26
    #12 0x4664aded in DB::ExecutionThreadContext::executeTask() build_msan/./src/Processors/Executors/ExecutionThreadContext.cpp:92:9
    #13 0x4661117c in DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic<bool>*) build_msan/./src/Processors/Executors/PipelineExecutor.cpp:228:26
    #14 0x46616d6b in DB::PipelineExecutor::executeSingleThread(unsigned long) build_msan/./src/Processors/Executors/PipelineExecutor.cpp:194:5
    #15 0x46616d6b in DB::PipelineExecutor::spawnThreads()::$_0::operator()() const build_msan/./src/Processors/Executors/PipelineExecutor.cpp:315:17
    #16 0x46616d6b in decltype(static_cast<DB::PipelineExecutor::spawnThreads()::$_0&>(fp)()) std::__1::__invoke_constexpr<DB::PipelineExecutor::spawnThreads()::$_0&>(DB::PipelineExecutor::spawnThreads()::$_0&) build_msan/./contrib/libcxx/include/type_traits:3648:23
    #17 0x46616d6b in decltype(auto) std::__1::__apply_tuple_impl<DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&>(DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&, std::__1::__tuple_indices<>) build_msan/./contrib/libcxx/include/tuple:1595:1
    #18 0x46616d6b in decltype(auto) std::__1::apply<DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&>(DB::PipelineExecutor::spawnThreads()::$_0&, std::__1::tuple<>&) build_msan/./contrib/libcxx/include/tuple:1604:1
    #19 0x46616d6b in ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()::operator()() build_msan/./src/Common/ThreadPool.h:193:13
    #20 0x46616d6b in decltype(static_cast<DB::PipelineExecutor::spawnThreads()::$_0>(fp)()) std::__1::__invoke<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&>(DB::PipelineExecutor::spawnThreads()::$_0&&) build_msan/./contrib/libcxx/include/type_traits:3640:23
    #21 0x46616d6b in void std::__1::__invoke_void_return_wrapper<void, true>::__call<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&>(ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&) build_msan/./contrib/libcxx/include/__functional/invoke.h:61:9
    #22 0x46616d6b in std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()>::operator()() build_msan/./contrib/libcxx/include/__functional/function.h:230:12
    #23 0x46616d6b in void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()>>(std::__1::__function::__policy_storage const*) build_msan/./contrib/libcxx/include/__functional/function.h:711:16
    #24 0x2712a290 in std::__1::__function::__policy_func<void ()>::operator()() const build_msan/./contrib/libcxx/include/__functional/function.h:843:16
    #25 0x2712a290 in std::__1::function<void ()>::operator()() const build_msan/./contrib/libcxx/include/__functional/function.h:1184:12
    #26 0x2712a290 in ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) build_msan/./src/Common/ThreadPool.cpp:294:17
    #27 0x27137182 in void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()::operator()() const build_msan/./src/Common/ThreadPool.cpp:144:73
    #28 0x27137182 in decltype(static_cast<void>(fp)()) std::__1::__invoke<void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>(void&&) build_msan/./contrib/libcxx/include/type_traits:3640:23
    #29 0x27137182 in void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>(std::__1::tuple<void, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>&, std::__1::__tuple_indices<>) build_msan/./contrib/libcxx/include/thread:282:5
    #30 0x27137182 in void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>>(void*) build_msan/./contrib/libcxx/include/thread:293:5
    #31 0x7fd7a488fb42 in start_thread nptl/pthread_create.c:442:8

SUMMARY: MemorySanitizer: use-of-uninitialized-value build_msan/./src/Common/DateLUTImpl.h:229:29 in DateLUTImpl::findIndex(long) const
Exiting
```

(note: this snipped shows a build from long time ago, but the problem appeared here: https://github.com/ClickHouse/ClickHouse/pull/43308)
{
        return total_values;
    }
    T quantileNearest(double level)
    {
        if (samples.empty())
            return onEmpty<T>();
        sortIfNeeded();
        double index = level * (samples.size() - 1);
        size_t int_index = static_cast<size_t>(index + 0.5); 
        int_index = std::max(0LU, std::min(samples.size() - 1, int_index));
        return samples[int_index];
    }
    /** If T is not a numeric type, using this method causes a compilation error,
      *  but use of error class does not. SFINAE.
      */
    double quantileInterpolated(double level)