rdblue commented on a change in pull request #1255:
URL: https://github.com/apache/iceberg/pull/1255#discussion_r472538385



##########
File path: data/src/main/java/org/apache/iceberg/data/orc/GenericOrcWriters.java
##########
@@ -326,7 +326,7 @@ public void nonNullWrite(int rowId, LocalDateTime data, 
ColumnVector output) {
     public void nonNullWrite(int rowId, BigDecimal data, ColumnVector output) {
       // TODO: validate precision and scale from schema
       ((DecimalColumnVector) output).vector[rowId]
-          .setFromLongAndScale(data.unscaledValue().longValueExact(), scale);
+          .setFromLongAndScale(data.unscaledValue().longValueExact(), 
data.scale());

Review comment:
       What about the TODO to check the scale matches the column's scale? As 
long as we're updating this, does it make sense to fix that, since we just had 
a decimal scale problem?




----------------------------------------------------------------
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]

Reply via email to