Commit dbf16f37 authored by Jessica Severin's avatar Jessica Severin
Browse files

when hive tables are empty a SUM(...) return NULL so need to check for that

parent 74e7ce80
......@@ -589,7 +589,9 @@ sub get_hive_progress
$sth->execute();
my ($done, $total) = $sth->fetchrow_array();
$sth->finish;
my $completed = 0.0;
$done=0 unless($done);
$total=0 unless($total);
my $completed=0.0;
$completed = ((100.0 * $done)/$total) if($total>0);
printf("hive %1.3f%% complete (%d done / %d total)\n", $completed, $done, $total);
return $done, $total;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment