KKcorps commented on code in PR #9851:
URL: https://github.com/apache/pinot/pull/9851#discussion_r1033916274
##########
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:
Makes sense.
--
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]