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/03/14 19:23:37 UTC

[GitHub] [pinot] Jackie-Jiang commented on a change in pull request #8350: Fix setting of metrics compression type in RealtimeSegmentConverter

Jackie-Jiang commented on a change in pull request #8350:
URL: https://github.com/apache/pinot/pull/8350#discussion_r826302131



##########
File path: pinot-segment-local/src/main/java/org/apache/pinot/segment/local/realtime/converter/RealtimeSegmentConverter.java
##########
@@ -94,14 +93,14 @@ public void build(@Nullable SegmentVersion segmentVersion, ServerMetrics serverM
     }
     if (_noDictionaryColumns != null) {
       genConfig.setRawIndexCreationColumns(_noDictionaryColumns);
-      Map<String, ChunkCompressionType> columnToCompressionType = new HashMap<>();
       for (String column : _noDictionaryColumns) {
         FieldSpec fieldSpec = _dataSchema.getFieldSpecFor(column);
+        // Compression type is already configured in the constructor of genConfig.
+        // Only update metrics compression type.
         if (fieldSpec.getFieldType().equals(FieldSpec.FieldType.METRIC)) {
-          columnToCompressionType.put(column, ChunkCompressionType.PASS_THROUGH);
+          genConfig.setRawIndexCompressionType(column, ChunkCompressionType.PASS_THROUGH);
         }
       }

Review comment:
       I think this part of the logic can be removed completely. In `SegmentColumnarIndexCreator.getColumnCompressionType()`, the compression type for metrics are default to `PASS_THROUGH`




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