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


##########
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/creator/IndexCreationContext.java:
##########
@@ -143,7 +140,6 @@ final class Builder {
     private int[] _mutableToImmutableDocIdMap;
     private String _tableNameWithType;
     private boolean _continueOnError;
-

Review Comment:
   (nit) Keep the empty line



##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/readers/PinotSegmentColumnReader.java:
##########
@@ -92,11 +105,13 @@ public Dictionary getDictionary() {
   }
 
   public int getDictId(int docId) {
+    Preconditions.checkState(_forwardIndexDictionaryEncoded,
+        "Cannot read dictIds from RAW forward index");

Review Comment:
   This is hot path, consider using `assert !_forwardIndexDictionaryEncoded;` 
which doesn't have overhead



##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/dictionary/DictionaryIndexType.java:
##########
@@ -129,7 +130,7 @@ protected ColumnConfigDeserializer<DictionaryIndexConfig> 
createDeserializerForL
             (accum, column) -> accum.put(column, 
DictionaryIndexConfig.DISABLED));
     ColumnConfigDeserializer<DictionaryIndexConfig> fromFieldConfigs =
         
IndexConfigDeserializer.fromCollection(TableConfig::getFieldConfigList, (accum, 
fieldConfig) -> {
-          if (fieldConfig.getEncodingType() == FieldConfig.EncodingType.RAW) {
+          if (fieldConfig.getEncodingType() == FieldConfig.EncodingType.RAW && 
!hasForwardIndexConfig(fieldConfig)) {

Review Comment:
   Why do we need this?



##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/realtime/impl/RealtimeSegmentConfig.java:
##########
@@ -441,5 +445,26 @@ public RealtimeSegmentConfig build() {
           _ingestionAggregationConfigs, _defaultNullHandlingEnabled, 
_partitionUpsertMetadataManager,
           _partitionDedupMetadataManager, _consumerDir, _textIndexConfig, 
_dropRecordOnPartitionMismatch);
     }
+
+    private void normalizeForwardIndexEncoding() {

Review Comment:
   What is this method trying to do? Can you add some javadoc?
   I don't think this is doing the right thing



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