You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "chenboat (via GitHub)" <gi...@apache.org> on 2024/04/04 23:21:05 UTC

Re: [PR] Improved segment build time for Lucene text index realtime to offline conversion [pinot]

chenboat commented on code in PR #12744:
URL: https://github.com/apache/pinot/pull/12744#discussion_r1552580631


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/creator/impl/SegmentIndexCreationDriverImpl.java:
##########
@@ -218,6 +224,19 @@ public void init(SegmentGeneratorConfig config, SegmentCreationDataSource dataSo
     LOGGER.debug("tempIndexDir:{}", _tempIndexDir);
   }
 
+  // input int[] can be used to map sortedDocIds[immutableId] = mutableId (based on RecordReader iteration order)
+  // output int[] should be used to map output[mutableId] = immutableId
+  private int[] convertSortedDocIds(@Nullable int[] sortedDocIds) {

Review Comment:
   sortedDocIds makes people think the docIds in the array is sorted. In this case it is not -- you probably mean immutableId is sorted as array index. Can we find a better name here with some explanation and example? e.g., immutableIdToMutableId map.



-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org