merge
public void merge(IndexSegment indexSegment,
int docId,
GenericRow newRecord)
Merges records and returns the merged record.
We used a map to indicate all configured fields for partial upsert. For these fields
(1) If the prev value is null, return the new value
(2) If the prev record is not null, the new value is null, return the prev value.
(3) If neither values are not null, then merge the value and return.
For un-configured fields, they are using default override behavior, regardless null values.
For example, overwrite merger will only override the prev value if the new value is not null.
Null values will override existing values if not configured. They can be ignored by using ignoreMerger.
- Parameters:
indexSegment - the segment of the last derived full record during ingestion.
docId - the docId of the last derived full record during ingestion in the segment.
newRecord - the new consumed record.