**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.
String current_format = insert_format;
    /// Data format can be specified in the INSERT query.
    if (const auto * insert = parsed_query->as<ASTInsertQuery>())
    {
        if (!insert->format.empty())
            current_format = insert->format;
    }
    auto source = global_context->getInputFormat(current_format, buf, sample, insert_format_max_block_size
    Pipe pipe(source
    if (columns_description.hasDefaults())
    {
        pipe.addSimpleTransform([&](const Block & header)
        {
            return std::make_shared<AddingDefaultsTransform>(header, columns_description, *source, global_context
        }
    }
    sendDataFromPipe(std::move(pipe), parsed_query
}
void ClientBase::sendDataFromPipe(Pipe&& pipe, ASTPtr parsed_query)
{
    QueryPipeline pipeline(std::move(pipe)
    PullingAsyncPipelineExecutor executor(pipeline
    Block block;
    while (executor.pull(block))
    {
        /// Check if server send Log packet
        
        /// Check if server send Exception packet
        auto packet_type = connection->checkPacket(0
        if (packet_type && *packet_type == Protocol::Server::Exception)