deepthi912 commented on code in PR #20261:
URL: https://github.com/apache/pinot/pull/20261#discussion_r4570891172
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/merger/PartialUpsertColumnarMerger.java:
##########
@@ -70,9 +70,15 @@ 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)));
+ // If the merge strategy is Force Overwrite merger and prevValue is
always overwritten by newValue.
+ // A null newValue is stored in the row as the column's default value,
so put null here to keep the
+ // column null instead of turning the default value into a real value.
+ if (newRow.isNullValue(column)) {
+ resultHolder.put(column, null);
Review Comment:
Good catch, thanks. Changed in 5306bf82f3: the FORCE_OVERWRITE branch now
puts nothing in the result holder, so the new row keeps its value, or its
ingestion-normalized placeholder and null marker, untouched. Added
`testForceOverwriteKeepsNormalizedTimePlaceholder` with separate time (`day`,
STRING `yyyyMMdd`) and comparison (`version`) columns. It fails with the
previous `null` result (the timestamp is replaced) and on master (the null
marker is dropped), and passes now.
--
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]