KKcorps commented on code in PR #9851:
URL: https://github.com/apache/pinot/pull/9851#discussion_r1031367910


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/PartialUpsertHandler.java:
##########
@@ -65,15 +73,18 @@ public PartialUpsertHandler(Schema schema, Map<String, 
UpsertConfig.Strategy> pa
    * @return a new row after merge
    */
   public GenericRow merge(GenericRow previousRecord, GenericRow newRecord) {
-    for (Map.Entry<String, PartialUpsertMerger> entry : 
_column2Mergers.entrySet()) {
-      String column = entry.getKey();
-      if (!previousRecord.isNullValue(column)) {
-        if (newRecord.isNullValue(column)) {
-          newRecord.putValue(column, previousRecord.getValue(column));
-          newRecord.removeNullValueField(column);
-        } else {
-          newRecord.putValue(column,
-              entry.getValue().merge(previousRecord.getValue(column), 
newRecord.getValue(column)));
+    for (String column : previousRecord.getFieldToValueMap().keySet()) {

Review Comment:
   shouldn't the iteration be done on the columns in the newRecord?



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to