parthchandra commented on code in PR #756: URL: https://github.com/apache/datafusion-comet/pull/756#discussion_r1709879694
########## common/src/main/java/org/apache/comet/vector/CometVector.java: ########## @@ -88,7 +90,11 @@ public Decimal getDecimal(int i, int precision, int scale) { if (!useDecimal128 && precision <= Decimal.MAX_INT_DIGITS() && type instanceof IntegerType) { return createDecimal(getInt(i), precision, scale); } else if (precision <= Decimal.MAX_LONG_DIGITS()) { - return createDecimal(useDecimal128 ? getLongDecimal(i) : getLong(i), precision, scale); + if (useDecimal128) { + return createDecimal(getLongFromDecimalBytes(getBinaryDecimal(i)), precision, scale); Review Comment: This PR leaves `CometDictionary.decodeToBinary` untouched (mainly because dictionary for decimals is a very rare case). However, `CometDictionary.decodeToBinary` does the same copy that `CometVector` was doing by calling `CometVector.copyBinaryValues` which this PR improves, so one would expect better performance? I haven't validated performance with dictionary values, though I have checked that the unit tests pass (`ParquetReadSuite` covers dictionary encoded decimals). -- 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