This is an automated email from the ASF dual-hosted git repository.

jackie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 525a8d0d227 Rename DictionaryIndexConfig.getUseVarLengthDictionary to 
isUseVarLengthDictionary (#17662)
525a8d0d227 is described below

commit 525a8d0d2272061858b5527e08c67bc938e156f8
Author: Radhika Patwari <[email protected]>
AuthorDate: Thu Feb 19 01:42:38 2026 +0530

    Rename DictionaryIndexConfig.getUseVarLengthDictionary to 
isUseVarLengthDictionary (#17662)
---
 .../segment/creator/impl/SegmentIndexCreationDriverImpl.java   |  2 +-
 .../local/segment/index/dictionary/DictionaryIndexType.java    |  4 ++--
 .../local/segment/index/loader/ForwardIndexHandler.java        |  2 +-
 .../index/loader/defaultcolumn/BaseDefaultColumnHandler.java   |  4 ++--
 .../segment/index/dictionary/DictionaryIndexTypeTest.java      |  2 +-
 .../apache/pinot/segment/spi/index/DictionaryIndexConfig.java  |  3 +--
 .../pinot/segment/spi/index/DictionaryIndexConfigTest.java     | 10 +++++-----
 7 files changed, 13 insertions(+), 14 deletions(-)

diff --git 
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/creator/impl/SegmentIndexCreationDriverImpl.java
 
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/creator/impl/SegmentIndexCreationDriverImpl.java
index c5226934745..c0c10b3d30a 100644
--- 
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/creator/impl/SegmentIndexCreationDriverImpl.java
+++ 
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/creator/impl/SegmentIndexCreationDriverImpl.java
@@ -507,7 +507,7 @@ public class SegmentIndexCreationDriverImpl implements 
SegmentIndexCreationDrive
       ColumnStatistics columnProfile = 
_segmentStats.getColumnProfileFor(column);
       DictionaryIndexConfig dictionaryIndexConfig = 
indexConfigsMap.get(column).getConfig(StandardIndexes.dictionary());
       boolean createDictionary = dictionaryIndexConfig.isDisabled();
-      boolean useVarLengthDictionary = 
dictionaryIndexConfig.getUseVarLengthDictionary()
+      boolean useVarLengthDictionary = 
dictionaryIndexConfig.isUseVarLengthDictionary()
           || 
DictionaryIndexType.optimizeTypeShouldUseVarLengthDictionary(storedType, 
columnProfile);
       Object defaultNullValue = fieldSpec.getDefaultNullValue();
       if (storedType == DataType.BYTES) {
diff --git 
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/dictionary/DictionaryIndexType.java
 
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/dictionary/DictionaryIndexType.java
index 11d4cb73c92..ba4390b81d8 100644
--- 
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/dictionary/DictionaryIndexType.java
+++ 
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/dictionary/DictionaryIndexType.java
@@ -106,7 +106,7 @@ public class DictionaryIndexType
   @Override
   public void validate(FieldIndexConfigs indexConfigs, FieldSpec fieldSpec, 
TableConfig tableConfig) {
     DictionaryIndexConfig dictionaryConfig = 
indexConfigs.getConfig(StandardIndexes.dictionary());
-    if (dictionaryConfig.isEnabled() && 
dictionaryConfig.getUseVarLengthDictionary()) {
+    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(),
@@ -161,7 +161,7 @@ public class DictionaryIndexType
   }
 
   public boolean shouldUseVarLengthDictionary(IndexCreationContext context, 
DictionaryIndexConfig indexConfig) {
-    if (indexConfig.getUseVarLengthDictionary()) {
+    if (indexConfig.isUseVarLengthDictionary()) {
       return true;
     }
     DataType storedType = context.getFieldSpec().getDataType().getStoredType();
diff --git 
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/ForwardIndexHandler.java
 
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/ForwardIndexHandler.java
index 52a606e1ec4..101d7023280 100644
--- 
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/ForwardIndexHandler.java
+++ 
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/ForwardIndexHandler.java
@@ -853,7 +853,7 @@ public class ForwardIndexHandler extends BaseIndexHandler {
       }
       DictionaryIndexConfig dictConf = 
_fieldIndexConfigs.get(column).getConfig(StandardIndexes.dictionary());
       boolean optimizeDictionaryType = 
_tableConfig.getIndexingConfig().isOptimizeDictionaryType();
-      boolean useVarLength = dictConf.getUseVarLengthDictionary() || 
DictionaryIndexType.shouldUseVarLengthDictionary(
+      boolean useVarLength = dictConf.isUseVarLengthDictionary() || 
DictionaryIndexType.shouldUseVarLengthDictionary(
           reader.getStoredType(), statsCollector) || (optimizeDictionaryType
           && 
DictionaryIndexType.optimizeTypeShouldUseVarLengthDictionary(reader.getStoredType(),
 statsCollector));
       dictionaryCreator = new SegmentDictionaryCreator(fieldSpec, 
segmentMetadata.getIndexDir(), useVarLength);
diff --git 
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/defaultcolumn/BaseDefaultColumnHandler.java
 
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/defaultcolumn/BaseDefaultColumnHandler.java
index 01c62cb18e0..041f93e637a 100644
--- 
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/defaultcolumn/BaseDefaultColumnHandler.java
+++ 
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/defaultcolumn/BaseDefaultColumnHandler.java
@@ -781,7 +781,7 @@ public abstract class BaseDefaultColumnHandler implements 
DefaultColumnHandler {
           }
           statsCollector.seal();
           indexCreationInfo = new ColumnIndexCreationInfo(statsCollector, 
createDictionary,
-              dictionaryIndexConfig.getUseVarLengthDictionary(), true, 
fieldSpec.getDefaultNullValue());
+              dictionaryIndexConfig.isUseVarLengthDictionary(), true, 
fieldSpec.getDefaultNullValue());
           break;
         }
         case BYTES: {
@@ -800,7 +800,7 @@ public abstract class BaseDefaultColumnHandler implements 
DefaultColumnHandler {
           if (!statsCollector.isFixedLength()) {
             useVarLengthDictionary = true;
           } else {
-            useVarLengthDictionary = 
dictionaryIndexConfig.getUseVarLengthDictionary();
+            useVarLengthDictionary = 
dictionaryIndexConfig.isUseVarLengthDictionary();
           }
           indexCreationInfo =
               new ColumnIndexCreationInfo(statsCollector, createDictionary, 
useVarLengthDictionary, true,
diff --git 
a/pinot-segment-local/src/test/java/org/apache/pinot/segment/local/segment/index/dictionary/DictionaryIndexTypeTest.java
 
b/pinot-segment-local/src/test/java/org/apache/pinot/segment/local/segment/index/dictionary/DictionaryIndexTypeTest.java
index c12aab565db..1a351fe58c8 100644
--- 
a/pinot-segment-local/src/test/java/org/apache/pinot/segment/local/segment/index/dictionary/DictionaryIndexTypeTest.java
+++ 
b/pinot-segment-local/src/test/java/org/apache/pinot/segment/local/segment/index/dictionary/DictionaryIndexTypeTest.java
@@ -298,7 +298,7 @@ public class DictionaryIndexTypeTest {
           
fieldConfig.getIndexes().get(StandardIndexes.dictionary().getPrettyName()),
           DictionaryIndexConfig.class);
       assertNotNull(config);
-      assertTrue(config.getUseVarLengthDictionary());
+      assertTrue(config.isUseVarLengthDictionary());
       postConversionAsserts();
     }
 
diff --git 
a/pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/index/DictionaryIndexConfig.java
 
b/pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/index/DictionaryIndexConfig.java
index ac1d6137a89..38b7c64d203 100644
--- 
a/pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/index/DictionaryIndexConfig.java
+++ 
b/pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/index/DictionaryIndexConfig.java
@@ -77,8 +77,7 @@ public class DictionaryIndexConfig extends IndexConfig {
     return _onHeap;
   }
 
-  // TODO: Rename it to isUseVarLengthDictionary
-  public boolean getUseVarLengthDictionary() {
+  public boolean isUseVarLengthDictionary() {
     return _useVarLengthDictionary;
   }
 
diff --git 
a/pinot-segment-spi/src/test/java/org/apache/pinot/segment/spi/index/DictionaryIndexConfigTest.java
 
b/pinot-segment-spi/src/test/java/org/apache/pinot/segment/spi/index/DictionaryIndexConfigTest.java
index f4faf0a62d6..911b6d6dc16 100644
--- 
a/pinot-segment-spi/src/test/java/org/apache/pinot/segment/spi/index/DictionaryIndexConfigTest.java
+++ 
b/pinot-segment-spi/src/test/java/org/apache/pinot/segment/spi/index/DictionaryIndexConfigTest.java
@@ -35,7 +35,7 @@ public class DictionaryIndexConfigTest {
 
     assertFalse(config.isDisabled(), "Unexpected disabled");
     assertFalse(config.isOnHeap(), "Unexpected onHeap");
-    assertFalse(config.getUseVarLengthDictionary(), "Unexpected 
useVarLengthDictionary");
+    assertFalse(config.isUseVarLengthDictionary(), "Unexpected 
useVarLengthDictionary");
   }
 
   @Test
@@ -46,7 +46,7 @@ public class DictionaryIndexConfigTest {
 
     assertFalse(config.isDisabled(), "Unexpected disabled");
     assertFalse(config.isOnHeap(), "Unexpected onHeap");
-    assertFalse(config.getUseVarLengthDictionary(), "Unexpected 
useVarLengthDictionary");
+    assertFalse(config.isUseVarLengthDictionary(), "Unexpected 
useVarLengthDictionary");
   }
 
   @Test
@@ -57,7 +57,7 @@ public class DictionaryIndexConfigTest {
 
     assertFalse(config.isDisabled(), "Unexpected disabled");
     assertFalse(config.isOnHeap(), "Unexpected onHeap");
-    assertFalse(config.getUseVarLengthDictionary(), "Unexpected 
useVarLengthDictionary");
+    assertFalse(config.isUseVarLengthDictionary(), "Unexpected 
useVarLengthDictionary");
   }
 
   @Test
@@ -68,7 +68,7 @@ public class DictionaryIndexConfigTest {
 
     assertTrue(config.isDisabled(), "Unexpected disabled");
     assertFalse(config.isOnHeap(), "Unexpected onHeap");
-    assertFalse(config.getUseVarLengthDictionary(), "Unexpected 
useVarLengthDictionary");
+    assertFalse(config.isUseVarLengthDictionary(), "Unexpected 
useVarLengthDictionary");
   }
 
   @Test
@@ -82,6 +82,6 @@ public class DictionaryIndexConfigTest {
 
     assertFalse(config.isDisabled(), "Unexpected disabled");
     assertTrue(config.isOnHeap(), "Unexpected onHeap");
-    assertTrue(config.getUseVarLengthDictionary(), "Unexpected 
useVarLengthDictionary");
+    assertTrue(config.isUseVarLengthDictionary(), "Unexpected 
useVarLengthDictionary");
   }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to