bersprockets commented on code in PR #39117:
URL: https://github.com/apache/spark/pull/39117#discussion_r1051693904
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala:
##########
@@ -1726,8 +1726,7 @@ object CodeGenerator extends Logging {
if (nullable) {
// Can't call setNullAt on DecimalType/CalendarIntervalType, because we
need to keep the
// offset
- if (!isVectorized && (dataType.isInstanceOf[DecimalType] ||
- dataType.isInstanceOf[CalendarIntervalType])) {
+ if (!isVectorized && UnsafeRowUtils.avoidSetNullAt(dataType)) {
Review Comment:
This will slightly change the conditions under which `CodeGenerator` will
avoid generating `row.setNullAt` for decimals. Before, `CodeGenerator` always
avoided calling `row.setNullAt` for decimals of any precision. Now it will only
do so if the decimal's precision is greater than `Decimal.MAX_LONG_DIGITS`
(which is the only case where it matters, AFAIK).
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]