HeartSaVioR commented on a change in pull request #24050: [MINOR][SQL]
Deduplicate codes reading from/writing to unsafe object
URL: https://github.com/apache/spark/pull/24050#discussion_r264119215
##########
File path:
sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/UnsafeArrayData.java
##########
@@ -227,74 +226,45 @@ public Decimal getDecimal(int ordinal, int precision,
int scale) {
if (precision <= Decimal.MAX_LONG_DIGITS()) {
return Decimal.apply(getLong(ordinal), precision, scale);
Review comment:
Other classes use `return Decimal.createUnsafe(getLong(ordinal), precision,
scale);` for same condition. Maybe this is just a missing spot, or some reason
to not apply `createUnsafe`?
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]