deemoliu commented on code in PR #11791:
URL: https://github.com/apache/pinot/pull/11791#discussion_r1373925000


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/BasePartitionUpsertMetadataManager.java:
##########
@@ -121,6 +121,32 @@ public List<String> getPrimaryKeyColumns() {
     return _primaryKeyColumns;
   }
 
+  private MutableRoaringBitmap getQueryableDocIds(IndexSegment segment, String 
deleteRecordColumn,
+      MutableRoaringBitmap validDocIds) {
+    MutableRoaringBitmap queryableDocIds = null;
+    if (deleteRecordColumn != null) {
+      queryableDocIds = new MutableRoaringBitmap();
+      // we allow passing null values for primaryKey columns and 
comparisonColumns to read deleteColumn to avoid paying
+      // the overhead of reading primary key, comparison column etc. They will 
never be null in other scenarios.
+      UpsertUtils.RecordInfoReader recordInfoReader =

Review Comment:
   when iterate the value of _deleteRecordColumn, can deletedRecord be null? 
can this be further optimize?
   ```
           if (deleteRecordColumnReader.isNull(doc_id)) {
             // defaultNullValue for deleteColumn is "false"
             queryableDocIds.add(doc_id);
           } else if (!(Boolean) deleteRecordColumnReader.getValue(doc_id)) {
             queryableDocIds.add(doc_id);
           }
   ```



-- 
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]

Reply via email to