rohityadav1993 commented on code in PR #13031:
URL: https://github.com/apache/pinot/pull/13031#discussion_r1584431592


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/PartialUpsertHandler.java:
##########
@@ -84,7 +84,12 @@ private void setMergedValue(GenericRow row, String column, 
@Nullable Object merg
       row.putValue(column, mergedValue);
     } else {
       // if column exists but mapped to a null value then merger result was a 
null value
-      row.putDefaultNullValue(column, 
_fieldSpecMap.get(column).getDefaultNullValue());
+      // check if column is a multivalued column
+      if (_fieldSpecMap.get(column).isSingleValueField()) {
+        row.putDefaultNullValue(column, 
_fieldSpecMap.get(column).getDefaultNullValue());

Review Comment:
   Initial implementation was setting null unconditionally: 
https://github.com/apache/pinot/pull/11983#discussion_r1550951066
   
   I think it should not matter if we use null value or defaultNullValue but 
multivalues need to specifically use `null` to not cause typecasting issues 
during indexing.



-- 
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]

Reply via email to