**Use case**

ClickHouse already throws exception if the data for INSERT is empty:

```
Code: 108. DB::Exception: No data to insert
```

Let's introduce a setting, enabled by default, to control this behavior.
The user will be able to disable it to allow empty INSERTs.

This is useful in some batch scripts.
throwIfFailedToSendResult();
                if (!check_for_cancel())
                    break;
            }
            if (!isQueryCancelled())
            {
                addTotalsToResult(executor->getTotalsBlock());
                addExtremesToResult(executor->getExtremesBlock());
                addProfileInfoToResult(executor->getProfileInfo());
            }
        }
        else
        {
            auto executor = std::make_shared<CompletedPipelineExecutor>(io.pipeline);
            auto callback = [&]() -> bool
            {
                throwIfFailedToSendResult();
                addProgressToResult();
                addLogsToResult();
                if (has_output() || result.has_progress() || result.logs_size())
                    sendResult();
                throwIfFailedToSendResult();
                return isQueryCancelled();
            };
            executor->setCancelCallback(std::move(callback), interactive_delay / 1000);
            executor->execute();
        }
        output_format_processor->finalize();
    }
    void Call::finishQuery()