From e9e58bbb1ff10e2d77708a4efc066fbc8f540a45 Mon Sep 17 00:00:00 2001 From: Dustin Brown Date: Sat, 5 Feb 2022 06:54:04 -0800 Subject: [PATCH] /.github/scripts/sql-correctness/get-dolt-correctness-job-json.sh: add precision to correctness percentage --- .../scripts/sql-correctness/get-dolt-correctness-job-json.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/scripts/sql-correctness/get-dolt-correctness-job-json.sh b/.github/scripts/sql-correctness/get-dolt-correctness-job-json.sh index 5610bc89a4..6eee87e9dc 100755 --- a/.github/scripts/sql-correctness/get-dolt-correctness-job-json.sh +++ b/.github/scripts/sql-correctness/get-dolt-correctness-job-json.sh @@ -14,9 +14,11 @@ timeprefix="$4" actorprefix="$5" format="$6" +precision="2" + resultCountQuery="select result, count(*) as total from results where result != 'skipped' group by result;" testCountQuery="select count(*) as total_tests from results where result != 'skipped';" -correctnessQuery="select ROUND(100.0 * (cast(ok_results.total as decimal) / (cast(all_results.total as decimal) + .000001))) as correctness_percentage from (select count(*) as total from results where result = 'ok') as ok_results join (select count(*) as total from results where result != 'skipped') as all_results" +correctnessQuery="select ROUND(100.0 * (cast(ok_results.total as decimal) / (cast(all_results.total as decimal) + .000001)), $precision) as correctness_percentage from (select count(*) as total from results where result = 'ok') as ok_results join (select count(*) as total from results where result != 'skipped') as all_results" echo ' {