I've tried to run optimize using clickhouse-local :) 
```
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007fb333cf3859 in __GI_abort () at abort.c:79
#2  0x0000000010e89c1c in Poco::SignalHandler::handleSignal (sig=11) at ../contrib/poco/Foundation/src/SignalHandler.cpp:94
#3  <signal handler called>
#4  DB::IVolume::getDisk (this=0x0) at ../src/Disks/IVolume.h:63
#5  DB::MergeTreeDataMergerMutator::mergePartsToTemporaryPart (this=<optimized out>, future_part=..., metadata_snapshot=..., merge_entry=..., time_of_merge=<optimized out>, context=..., 
    space_reservation=..., deduplicate=<optimized out>) at ../src/Storages/MergeTree/MergeTreeDataMergerMutator.cpp:719
#6  0x000000000e0f07d9 in DB::StorageMergeTree::merge (this=<optimized out>, aggressive=<optimized out>, partition_id=..., final=<optimized out>, deduplicate=<optimized out>, 
    out_disable_reason=<optimized out>) at ../src/Storages/StorageMergeTree.cpp:746
#7  0x000000000e0f54fc in DB::StorageMergeTree::optimize (this=0x7fb33362f700, partition=..., final=<optimized out>, deduplicate=<optimized out>, context=...)
    at ../src/Storages/StorageMergeTree.cpp:1032
#8  0x000000000dbdd824 in DB::InterpreterOptimizeQuery::execute (this=0x7fb332e983e0) at ../src/Interpreters/InterpreterOptimizeQuery.cpp:30
#9  0x000000000dee5908 in DB::executeQueryImpl (begin=<optimized out>, end=<optimized out>, context=..., internal=<optimized out>, stage=<optimized out>, has_query_tail=<optimized out>, 
    istr=<optimized out>) at ../src/Interpreters/executeQuery.cpp:422
#10 0x000000000dee85a9 in DB::executeQuery(DB::ReadBuffer&, DB::WriteBuffer&, bool, DB::Context&, std::__1::function<void (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::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&)>) (istr=..., ostr=..., allow_into_outfile=false, context=..., set_result_details=...)
    at ../src/Interpreters/executeQuery.cpp:796
#11 0x0000000007c71ed0 in DB::LocalServer::processQueries (this=<optimized out>) at ../programs/local/LocalServer.cpp:361
#12 0x0000000007c6fee3 in DB::LocalServer::main (this=0x7fff1f995348) at ../programs/local/LocalServer.cpp:270
#13 0x0000000010d7b513 in Poco::Util::Application::run (this=0x7fff1f995348) at ../contrib/poco/Util/src/Application.cpp:334
#14 0x0000000007c75a8b in mainEntryClickHouseLocal (argc=8, argv=0x7fb332ee7680) at ../programs/local/LocalServer.cpp:597
#15 0x0000000007b87cbd in main (argc_=<optimized out>, argv_=<optimized out>) at ../programs/main.cpp:400
```

So it's from this line: 
https://github.com/ClickHouse/ClickHouse/blob/38c7132c0f580547a72e3cc1fa18a091abf46221/src/Storages/MergeTree/MergeTreeDataMergerMutator.cpp#L719
(getTemporaryVolume is nullptr)

Introduced https://github.com/ClickHouse/ClickHouse/pull/8750

("ignore-error", "do not stop processing if a query failed")
        ("version,V", "print version information and exit")
        ;
    cmd_settings.addProgramOptions(description);
    
    po::parsed_options parsed = po::command_line_parser(argc, argv).options(description).run();
    po::variables_map options;
    po::store(parsed, options);
    po::notify(options);
    if (options.count("version") || options.count("V"))
    {
        showClientVersion();
        exit(0);
    }
    if (options.empty() || options.count("help"))
    {
        std::cout << getHelpHeader() << "\n";
        std::cout << description << "\n";
        std::cout << getHelpFooter() << "\n";
        exit(0);
    }
    
    if (options.count("config-file"))
        config().setString("config-file", options["config-file"].as<std::string>());
    if (options.count("query"))
        config().setString("query", options["query"].as<std::string>());
    if (options.count("database"))
        config().setString("default_database", options["database"].as<std::string>());
    if (options.count("table"))
        config().setString("table-name", options["table"].as<std::string>());