**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.
std::cout << "Query was cancelled." << std::endl;
}
/// Receive a part of the result, or progress info or an exception and process it.
/// Returns true if one should continue receiving packets.
/// Output of result is suppressed if query was cancelled.
bool ClientBase::receiveAndProcessPacket(ASTPtr parsed_query, bool cancelled_)
{
    Packet packet = connection->receivePacket(
    switch (packet.type)
    {
        case Protocol::Server::PartUUIDs:
            return true;
        case Protocol::Server::Data:
            if (!cancelled_)
                onData(packet.block, parsed_query
            return true;
        case Protocol::Server::Progress:
            onProgress(packet.progress
            return true;
        case Protocol::Server::ProfileInfo:
            onProfileInfo(packet.profile_info
            return true;
        case Protocol::Server::Totals:
            if (!cancelled_)
                onTotals(packet.block, parsed_query
            return true;
        case Protocol::Server::Extremes:
            if (!cancelled_)
                onExtremes(packet.block, parsed_query
            return true;