RajaVinoth96 commented on code in PR #18751:
URL: https://github.com/apache/pinot/pull/18751#discussion_r3487595888


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/dictionary/DictionaryIndexType.java:
##########
@@ -110,11 +109,22 @@ public DictionaryIndexConfig getDefaultConfig() {
   @Override
   public void validate(FieldIndexConfigs indexConfigs, FieldSpec fieldSpec, 
TableConfig tableConfig) {
     DictionaryIndexConfig dictionaryConfig = 
indexConfigs.getConfig(StandardIndexes.dictionary());
-    if (dictionaryConfig.isEnabled() && 
dictionaryConfig.isUseVarLengthDictionary()) {
-      DataType storedType = fieldSpec.getDataType().getStoredType();
-      Preconditions.checkState(!storedType.isFixedWidth(),
-          "Cannot create var-length dictionary on column: %s of fixed-width 
stored type: %s", fieldSpec.getName(),
-          storedType);
+    if (dictionaryConfig.isEnabled()) {
+      if (dictionaryConfig.isUseVarLengthDictionary()) {
+        DataType storedType = fieldSpec.getDataType().getStoredType();
+        Preconditions.checkState(!storedType.isFixedWidth(),
+            "Cannot create var-length dictionary on column: %s of fixed-width 
stored type: %s", fieldSpec.getName(),
+            storedType);
+      }
+      for (IndexType indexType : List.of(
+          StandardIndexes.vector(),
+          StandardIndexes.json(),
+          StandardIndexes.text(),
+          StandardIndexes.h3())) {

Review Comment:
   I believe in the code base dictionary indexes are disabled for text columns 
and text index are better suited for large data dump of strings where 
dictionary is better for low cardinality values.



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