Skip to content

Commit

Permalink
Removed else
Browse files Browse the repository at this point in the history
  • Loading branch information
GrigoriyPA committed Jul 9, 2024
1 parent 0d4f0bc commit 98e6a73
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions ydb/tests/tools/kqprun/kqprun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,8 @@ void RunArgumentQueries(const TExecutionOptions& executionOptions, NKqpRun::TKqp
case TExecutionOptions::EExecutionCase::GenericScript:
if (!runner.ExecuteScript(executionOptions.ScriptQueries[id], executionOptions.ScriptQueryAction, executionOptions.TraceId)) {
ythrow yexception() << TInstant::Now().ToIsoStringLocal() << " Script execution failed";
} else {
Cout << colors.Cyan() << "Script request finished. Time: " << TInstant::Now() - startTime << colors.Default() << Endl;
}
Cout << colors.Cyan() << "Script request finished. Time: " << TInstant::Now() - startTime << colors.Default() << Endl;
Cout << colors.Yellow() << TInstant::Now().ToIsoStringLocal() << " Fetching script results..." << colors.Default() << Endl;
if (!runner.FetchScriptResults()) {
ythrow yexception() << TInstant::Now().ToIsoStringLocal() << " Fetch script results failed";
Expand All @@ -113,17 +112,15 @@ void RunArgumentQueries(const TExecutionOptions& executionOptions, NKqpRun::TKqp
case TExecutionOptions::EExecutionCase::GenericQuery:
if (!runner.ExecuteQuery(executionOptions.ScriptQueries[id], executionOptions.ScriptQueryAction, executionOptions.TraceId)) {
ythrow yexception() << TInstant::Now().ToIsoStringLocal() << " Query execution failed";
} else {
Cout << colors.Cyan() << "Generic request finished. Time: " << TInstant::Now() - startTime << colors.Default() << Endl;
}
Cout << colors.Cyan() << "Generic request finished. Time: " << TInstant::Now() - startTime << colors.Default() << Endl;
break;

case TExecutionOptions::EExecutionCase::YqlScript:
if (!runner.ExecuteYqlScript(executionOptions.ScriptQueries[id], executionOptions.ScriptQueryAction, executionOptions.TraceId)) {
ythrow yexception() << TInstant::Now().ToIsoStringLocal() << " Yql script execution failed";
} else {
Cout << colors.Cyan() << "Yql script request finished. Time: " << TInstant::Now() - startTime << colors.Default() << Endl;
}
Cout << colors.Cyan() << "Yql script request finished. Time: " << TInstant::Now() - startTime << colors.Default() << Endl;
break;

case TExecutionOptions::EExecutionCase::AsyncQuery:
Expand Down

0 comments on commit 98e6a73

Please sign in to comment.