You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/10/14 03:53:04 UTC

[GitHub] [pinot] siddharthteotia commented on a diff in pull request #9510: Allow changing compressionType for raw MV columns during segmentReload

siddharthteotia commented on code in PR #9510:
URL: https://github.com/apache/pinot/pull/9510#discussion_r995316422


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/ForwardIndexHandler.java:
##########
@@ -173,7 +168,143 @@ private void rewriteRawForwardIndex(String column, SegmentDirectory.Writer segme
       IndexCreatorProvider indexCreatorProvider)
       throws Exception {
     Preconditions.checkState(_segmentMetadata.getVersion() == SegmentVersion.v3);
+    ColumnMetadata existingColMetadata = _segmentMetadata.getColumnMetadataFor(column);
+    boolean isSingleValue = existingColMetadata.isSingleValue();
+
+    if (isSingleValue) {
+      rewriteRawSVForwardIndex(column, segmentWriter, indexCreatorProvider);
+    } else {
+      rewriteRawMVForwardIndex(column, segmentWriter, indexCreatorProvider);
+    }
+  }
+
+  private void rewriteRawMVForwardIndex(String column, SegmentDirectory.Writer segmentWriter,

Review Comment:
   (nit) I feel this function is way too long. please consider creating a helper function



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