Merge pull request #55240 from aiven-sal/aiven-sal/client

clickhouse-client: don't show "0 rows in set" if it is zero and if exception was thrown
This commit is contained in:
Alexey Milovidov 2023-10-26 13:52:53 +02:00 committed by GitHub
commit 9313b343e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1918,9 +1918,10 @@ void ClientBase::processParsedSingleQuery(const String & full_query, const Strin
if (is_interactive)
{
std::cout << std::endl
<< processed_rows << " row" << (processed_rows == 1 ? "" : "s")
<< " in set. Elapsed: " << progress_indication.elapsedSeconds() << " sec. ";
std::cout << std::endl;
if (!server_exception || processed_rows != 0)
std::cout << processed_rows << " row" << (processed_rows == 1 ? "" : "s") << " in set. ";
std::cout << "Elapsed: " << progress_indication.elapsedSeconds() << " sec. ";
progress_indication.writeFinalProgress();
std::cout << std::endl << std::endl;
}