This is an automated email from the ASF dual-hosted git repository.
jackie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 3648f182fe Reverts strictly skipping removeNull from comparison column
(#11044)
3648f182fe is described below
commit 3648f182feaa36ad7d63da8388061d0ca6acb4d6
Author: Evan Galpin <[email protected]>
AuthorDate: Thu Jul 6 13:11:40 2023 -0700
Reverts strictly skipping removeNull from comparison column (#11044)
---
.../apache/pinot/segment/local/upsert/PartialUpsertHandler.java | 7 +------
.../local/indexsegment/mutable/MutableSegmentImplUpsertTest.java | 4 +++-
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/PartialUpsertHandler.java
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/PartialUpsertHandler.java
index 483ec6d6bb..86c268e509 100644
---
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/PartialUpsertHandler.java
+++
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/PartialUpsertHandler.java
@@ -74,12 +74,7 @@ public class PartialUpsertHandler {
// comparison column values from the previous record, and the sole
non-null comparison column value from
// the new record.
newRecord.putValue(column, previousRecord.getValue(column));
- if (!_comparisonColumns.contains(column)) {
- // Despite wanting to overwrite the values to comparison columns
from prior records, we want to
- // preserve for _this_ record which comparison column was
non-null. Doing so will allow us to
- // re-evaluate the same comparisons when reading a segment and
during steady-state stream ingestion
- newRecord.removeNullValueField(column);
- }
+ newRecord.removeNullValueField(column);
} else if (!_comparisonColumns.contains(column)) {
PartialUpsertMerger merger = _column2Mergers.getOrDefault(column,
_defaultPartialUpsertMerger);
newRecord.putValue(column,
diff --git
a/pinot-segment-local/src/test/java/org/apache/pinot/segment/local/indexsegment/mutable/MutableSegmentImplUpsertTest.java
b/pinot-segment-local/src/test/java/org/apache/pinot/segment/local/indexsegment/mutable/MutableSegmentImplUpsertTest.java
index 1138d891c5..afaf2b566a 100644
---
a/pinot-segment-local/src/test/java/org/apache/pinot/segment/local/indexsegment/mutable/MutableSegmentImplUpsertTest.java
+++
b/pinot-segment-local/src/test/java/org/apache/pinot/segment/local/indexsegment/mutable/MutableSegmentImplUpsertTest.java
@@ -139,7 +139,8 @@ public class MutableSegmentImplUpsertTest {
// Confirm that both comparison column values have made it into the
persisted upserted doc
Assert.assertEquals(1567205397L, _mutableSegmentImpl.getValue(2,
"secondsSinceEpoch"));
Assert.assertEquals(1567205395L, _mutableSegmentImpl.getValue(2,
"otherComparisonColumn"));
-
Assert.assertTrue(_mutableSegmentImpl.getDataSource("secondsSinceEpoch").getNullValueVector().isNull(2));
+
Assert.assertFalse(_mutableSegmentImpl.getDataSource("secondsSinceEpoch").getNullValueVector().isNull(2));
+
Assert.assertFalse(_mutableSegmentImpl.getDataSource("otherComparisonColumn").getNullValueVector().isNull(2));
// bb
Assert.assertFalse(bitmap.contains(4));
@@ -149,6 +150,7 @@ public class MutableSegmentImplUpsertTest {
Assert.assertEquals(1567205396L, _mutableSegmentImpl.getValue(5,
"secondsSinceEpoch"));
Assert.assertEquals(Long.MIN_VALUE, _mutableSegmentImpl.getValue(5,
"otherComparisonColumn"));
Assert.assertTrue(_mutableSegmentImpl.getDataSource("otherComparisonColumn").getNullValueVector().isNull(5));
+
Assert.assertFalse(_mutableSegmentImpl.getDataSource("secondsSinceEpoch").getNullValueVector().isNull(5));
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]