Skip to content

Commit 2b7feb0

Browse files
committed
change double rounding in csv tests from DOWN to HALF_DOWN
1 parent b9a2625 commit 2b7feb0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/EsqlSpecTestCase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,9 +360,9 @@ private Object valueMapper(CsvTestUtils.Type type, Object value) {
360360
}
361361
return values;
362362
} else if (value instanceof Double d) {
363-
return new BigDecimal(d).round(new MathContext(7, RoundingMode.DOWN)).doubleValue();
363+
return new BigDecimal(d).round(new MathContext(7, RoundingMode.HALF_DOWN)).doubleValue();
364364
} else if (value instanceof String s) {
365-
return new BigDecimal(s).round(new MathContext(7, RoundingMode.DOWN)).doubleValue();
365+
return new BigDecimal(s).round(new MathContext(7, RoundingMode.HALF_DOWN)).doubleValue();
366366
}
367367
}
368368
if (type == CsvTestUtils.Type.TEXT || type == CsvTestUtils.Type.KEYWORD || type == CsvTestUtils.Type.SEMANTIC_TEXT) {

0 commit comments

Comments
 (0)