Jackie-Jiang commented on code in PR #17396:
URL: https://github.com/apache/pinot/pull/17396#discussion_r2636044778


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/invertedindex/TextIndexHandler.java:
##########
@@ -127,6 +127,9 @@ public void updateIndices(SegmentDirectory.Writer 
segmentWriter)
     Set<String> existingColumns = 
segmentWriter.toSegmentDirectory().getColumnsWithIndex(StandardIndexes.text());
     // Handle configuration changes for existing indexes
     for (String column : existingColumns) {
+      if (!columnsToAddIdx.contains(column)) {

Review Comment:
   Please add some comment explaining this



##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/store/SingleFileIndexDirectory.java:
##########
@@ -449,7 +449,6 @@ public void removeIndex(String columnName, IndexType<?, ?, 
?> indexType) {
     // Text index is kept in its own files, thus can be removed directly.
     if (indexType == StandardIndexes.text()) {
       TextIndexUtils.cleanupTextIndex(_segmentDirectory, columnName);
-      return;

Review Comment:
   The comment above no longer apply. Are you sure it is safe to perform the 
following logic? It is safer to handle text index logic separately - first 
check if it is stored as separate file, then remove it accordingly. Please add 
comment to explain the logic



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