parthchandra commented on code in PR #682: URL: https://github.com/apache/datafusion-comet/pull/682#discussion_r1683437858
########## common/src/main/java/org/apache/comet/vector/CometVector.java: ########## @@ -79,14 +79,23 @@ public Decimal getDecimal(int i, int precision, int scale) { } else { byte[] bytes = getBinaryDecimal(i); BigInteger bigInteger = new BigInteger(bytes); - BigDecimal javaDecimal = new BigDecimal(bigInteger, scale); Review Comment: This is only for precision > 18. `Decimal` internally keeps the value either as BigDecimal or long. By assigning to BigInteger the Decimal implementation will check if the value will fit in a long and if not then convert to a BigDecimal. But we have already made the check to see if the value will fit into a long so we can save that check by converting to BigDecimal directly. -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org