fix sqllogictest harness to use float rounding (#7426)

This commit is contained in:
James Cor
2024-01-30 13:33:04 -08:00
committed by GitHub
parent bb42b5c5fb
commit a62f902fff
2 changed files with 3 additions and 2 deletions

View File

@@ -1 +1 @@
99.998669
99.998787

View File

@@ -225,7 +225,8 @@ func toSqlString(val interface{}) string {
return fmt.Sprintf("%.3f", v)
case decimal.Decimal:
// exactly 3 decimal points for floats
return v.StringFixed(3)
res, _ := v.Float64()
return fmt.Sprintf("%.3f", res)
case int:
return strconv.Itoa(v)
case uint: