deepthi912 commented on code in PR #20261:
URL: https://github.com/apache/pinot/pull/20261#discussion_r4583205286
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/merger/PartialUpsertColumnarMerger.java:
##########
@@ -70,9 +70,11 @@ public void merge(LazyRow previousRow, GenericRow newRow,
Map<String, Object> re
PartialUpsertColumnMerger merger = _column2Mergers.getOrDefault(column,
_defaultColumnValueMerger);
if (merger instanceof ForceOverwriteMerger) {
// Force Overwrite mergers
- // If the merge strategy is Force Overwrite merger and prevValue is
always overwritten by newValue
- Object prevValue = previousRow.getValue(column);
- resultHolder.put(column, merger.merge(prevValue,
newRow.getValue(column)));
+ // The new row already holds the result: the new value, or for a null
value the placeholder that ingestion
+ // put in the row together with its null marker. Leave the column
untouched so both are kept; putting a
+ // value in the result holder would clear the null marker or replace
an ingestion-normalized placeholder
+ // (e.g. a time column's default) with the schema default.
+ continue;
Review Comment:
Follow-up: on reflection I reverted the removal (b31dc190f1) and kept
`ForceOverwriteMerger`. Like `OverwriteMerger`, whose `merge()` the columnar
merger also never calls, it marks the strategy: every column resolves through
the same factory lookup and the merger branches on its type. Removing it needed
a separate FORCE_OVERWRITE column set, a nullable default merger and a gap in
the factory, and it would break custom mergers that use this public class, for
no runtime gain. The fix itself (leave the row untouched for FORCE_OVERWRITE)
is unchanged.
--
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]