mattyb149 commented on a change in pull request #4938:
URL: https://github.com/apache/nifi/pull/4938#discussion_r603330567
##########
File path:
nifi-nar-bundles/nifi-extension-utils/nifi-database-utils/src/test/java/org/apache/nifi/util/db/TestJdbcCommon.java
##########
@@ -465,7 +474,12 @@ private void
testConvertToAvroStreamForBigDecimal(BigDecimal bigDecimal, int dbP
assertEquals("decimal", logicalType.getName());
LogicalTypes.Decimal decimalType = (LogicalTypes.Decimal)
logicalType;
assertEquals(expectedPrecision, decimalType.getPrecision());
- assertEquals(expectedScale, decimalType.getScale());
+ // If scale > precision then precision will be set to the scale
value
+ if (expectedScale > expectedPrecision) {
+ assertEquals(expectedScale, decimalType.getScale());
+ } else {
+ assertEquals(expectedScale, decimalType.getScale());
Review comment:
Oops that's leftover from when I tried setting scale to precision
instead of the other way around. Will condense into a single check, good catch
--
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]