Round the sum of percentages before validating to account for floating point errors (#1824)
* Round the sum of percentages before validating to account for floating point errors --------- Co-authored-by: Kian Cossettini <Kian.Cossettini@amd.com>
This commit is contained in:
+1
-1
@@ -36,7 +36,7 @@
|
||||
"description": "Verify that percentages sum to 100.",
|
||||
"error_message": "Percentages do not sum to 100.",
|
||||
"expected_result": 100,
|
||||
"query": "SELECT SUM(percentage) FROM top;"
|
||||
"query": "SELECT ROUND(SUM(percentage), 1) FROM top;"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@
|
||||
"description": "Verify that percentages sum to 100.",
|
||||
"error_message": "Percentages do not sum to 100.",
|
||||
"expected_result": 100,
|
||||
"query": "SELECT SUM(percentage) FROM top;"
|
||||
"query": "SELECT ROUND(SUM(percentage), 1) FROM top;"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user