If we are enabling async_insert, query log missing all insert queries.

We are using log for monitoring, too (inserts time, inserts frequency etc), and with  async_insert query_log is empty. Maybe log can be written anyway?
pipeline = std::move(*maybe_pipeline);
            is_distributed_insert_select = true;
        }
    }
    std::vector<Chain> out_chains;
    if (!is_distributed_insert_select || query.watch)
    {
        size_t out_streams_size = 1;
        if (query.select)
        {
            bool is_trivial_insert_select = false;
            if (settings.optimize_trivial_insert_select)
            {
                const auto & select_query = query.select->as<ASTSelectWithUnionQuery &>();
                const auto & selects = select_query.list_of_selects->children;
                const auto & union_modes = select_query.list_of_modes;
                
                const auto mode_is_all = [](const auto & mode) { return mode == SelectUnionMode::ALL; };
                is_trivial_insert_select =
                    std::all_of(union_modes.begin(), union_modes.end(), std::move(mode_is_all))
                    && std::all_of(selects.begin(), selects.end(), isTrivialSelect);
            }
            if (is_trivial_insert_select)
            {
                /** When doing trivial INSERT INTO ... SELECT ... FROM table,
                  * don't need to process SELECT with more than max_insert_threads
                  * and it's reasonable to set block size for SELECT to the desired block size for INSERT
                  * to avoid unnecessary squashing.
                  */
                Settings new_settings = getContext()->getSettings();