rdblue commented on a change in pull request #1742:
URL: https://github.com/apache/iceberg/pull/1742#discussion_r520197685
##########
File path:
api/src/test/java/org/apache/iceberg/expressions/TestNumericLiteralConversions.java
##########
@@ -153,17 +154,12 @@ public void testDoubleToDecimalConversion() {
public void testDecimalToDecimalConversion() {
Literal<BigDecimal> lit = Literal.of(new BigDecimal("34.11"));
- Assert.assertSame("Should return identical object when converting to same
scale",
- lit, lit.to(Types.DecimalType.of(9, 2)));
- Assert.assertSame("Should return identical object when converting to same
scale",
- lit, lit.to(Types.DecimalType.of(11, 2)));
-
- Assert.assertNull("Changing decimal scale is not allowed",
- lit.to(Types.DecimalType.of(9, 0)));
- Assert.assertNull("Changing decimal scale is not allowed",
- lit.to(Types.DecimalType.of(9, 1)));
- Assert.assertNull("Changing decimal scale is not allowed",
- lit.to(Types.DecimalType.of(9, 3)));
+ IntStream.range(0, 10).forEach(scale -> {
+ Assert.assertSame("Should return identical object",
+ lit, lit.to(Types.DecimalType.of(9, scale)));
Review comment:
Nit: indentation is off. It should be 2 indents (4 spaces) for
continuation indents.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]