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

xiangfu 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 c23b8fdfb1b Fix MutableColumnStatisticsTest (#18018)
c23b8fdfb1b is described below

commit c23b8fdfb1bf7afd3c0d8845e371608752f27503
Author: Xiaotian (Jackie) Jiang <[email protected]>
AuthorDate: Sat Mar 28 21:19:55 2026 -0700

    Fix MutableColumnStatisticsTest (#18018)
---
 .../local/realtime/converter/stats/MutableColumnStatisticsTest.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/pinot-segment-local/src/test/java/org/apache/pinot/segment/local/realtime/converter/stats/MutableColumnStatisticsTest.java
 
b/pinot-segment-local/src/test/java/org/apache/pinot/segment/local/realtime/converter/stats/MutableColumnStatisticsTest.java
index 61f26cdd487..f34202a9d27 100644
--- 
a/pinot-segment-local/src/test/java/org/apache/pinot/segment/local/realtime/converter/stats/MutableColumnStatisticsTest.java
+++ 
b/pinot-segment-local/src/test/java/org/apache/pinot/segment/local/realtime/converter/stats/MutableColumnStatisticsTest.java
@@ -18,12 +18,12 @@
  */
 package org.apache.pinot.segment.local.realtime.converter.stats;
 
+import com.google.common.base.Utf8;
 import java.nio.charset.StandardCharsets;
 import org.apache.commons.lang3.RandomStringUtils;
 import org.apache.pinot.segment.spi.datasource.DataSource;
 import org.apache.pinot.segment.spi.index.reader.Dictionary;
 import org.apache.pinot.spi.data.FieldSpec.DataType;
-import org.mockito.stubbing.Answer;
 import org.testng.annotations.Test;
 
 import static org.mockito.ArgumentMatchers.anyInt;
@@ -53,8 +53,8 @@ public class MutableColumnStatisticsTest {
     when(dataSource.getDictionary()).thenReturn(dictionary);
     when(dictionary.getValueType()).thenReturn(DataType.STRING);
     when(dictionary.length()).thenReturn(numElements);
-    when(dictionary.getStringValue(anyInt())).thenAnswer(
-        (Answer<String>) invocation -> elements[(int) 
invocation.getArgument(0)]);
+    when(dictionary.getValueSize(anyInt())).thenAnswer(
+        invocation -> Utf8.encodedLength(elements[(int) 
invocation.getArgument(0)]));
 
     MutableColumnStatistics columnStatistics = new 
MutableColumnStatistics(dataSource, null, false);
     assertEquals(columnStatistics.getLengthOfShortestElement(), 
minElementLength);


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

Reply via email to