**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.
write_buffer->finalize();
                output_size = output.size();
            }
            else
            {
                if (compressing_write_buffer && compressing_write_buffer->offset())
                {
                    LOG_DEBUG(log, "Compressing {} bytes", compressing_write_buffer->offset());
                    compressing_write_buffer->sync();
                }
                output_size = nested_write_buffer->position() - output.data();
            }
            if (output_size)
            {
                result.mutable_output()->assign(output.data(), output_size);
                nested_write_buffer->restart(); 
            }
        }
        if (!send_final_message && result.output().empty() && result.totals().empty() && result.extremes().empty() && !result.logs_size()
            && !result.has_progress() && !result.has_stats() && !result.has_exception() && !result.cancelled())
            return; 
        
        
        if (sending_result.get())
        {
            Stopwatch client_reading_watch;
            sending_result.wait(false);
            waited_for_client_reading += client_reading_watch.elapsedNanoseconds();
        }
        throwIfFailedToSendResult();