dongjoon-hyun commented on a change in pull request #743:
URL: https://github.com/apache/orc/pull/743#discussion_r689663716
##########
File path: java/core/src/java/org/apache/orc/impl/ConvertTreeReaderFactory.java
##########
@@ -962,7 +963,10 @@ public void setConvertVectorElement(int elementNum) throws
IOException {
seconds += 1;
nanos = 1_000_000_000 - nanos;
}
- HiveDecimal value = HiveDecimal.create(String.format("%d.%09d", seconds,
nanos));
+ BigDecimal secondsBd = new BigDecimal(seconds);
+ BigDecimal nanosBd = new BigDecimal(nanos).movePointLeft(9);
+ BigDecimal resultBd = (seconds >= 0L) ? secondsBd.add(nanosBd) :
secondsBd.subtract(nanosBd);
Review comment:
Thank you for checking. Got it. That looks like an enough test coverage.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]