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

Jackie-Jiang 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 33d88e480ba Remove unused ValueReader.getPaddedString API (#19635)
33d88e480ba is described below

commit 33d88e480ba7e05528e619c34e100b0dc3965db6
Author: Xiaotian (Jackie) Jiang <[email protected]>
AuthorDate: Wed Sep 23 12:09:09 2026 -0700

    Remove unused ValueReader.getPaddedString API (#19635)
---
 .../segment/local/io/util/FixedByteValueReaderWriter.java     | 11 -----------
 .../org/apache/pinot/segment/local/io/util/ValueReader.java   |  3 ---
 .../pinot/segment/local/io/util/VarLengthValueReader.java     |  5 -----
 .../local/segment/index/readers/BaseImmutableDictionary.java  |  4 ----
 4 files changed, 23 deletions(-)

diff --git 
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/io/util/FixedByteValueReaderWriter.java
 
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/io/util/FixedByteValueReaderWriter.java
index 6e62eb268c4..a683967163b 100644
--- 
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/io/util/FixedByteValueReaderWriter.java
+++ 
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/io/util/FixedByteValueReaderWriter.java
@@ -23,8 +23,6 @@ import java.nio.ByteOrder;
 import java.util.Arrays;
 import org.apache.pinot.segment.spi.memory.PinotDataBuffer;
 
-import static java.nio.charset.StandardCharsets.UTF_8;
-
 
 public final class FixedByteValueReaderWriter implements ValueReader {
   private final PinotDataBuffer _dataBuffer;
@@ -83,15 +81,6 @@ public final class FixedByteValueReaderWriter implements 
ValueReader {
     return i;
   }
 
-  @Override
-  public String getPaddedString(int index, int numBytesPerValue, byte[] 
buffer) {
-    assert buffer.length >= numBytesPerValue;
-
-    long startOffset = (long) index * numBytesPerValue;
-    _dataBuffer.copyTo(startOffset, buffer, 0, numBytesPerValue);
-    return new String(buffer, 0, numBytesPerValue, UTF_8);
-  }
-
   @Override
   public int readBytes(int index, int numBytesPerValue, byte[] buffer) {
     assert buffer.length >= numBytesPerValue;
diff --git 
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/io/util/ValueReader.java
 
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/io/util/ValueReader.java
index 5e9d34a5940..6522eb88584 100644
--- 
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/io/util/ValueReader.java
+++ 
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/io/util/ValueReader.java
@@ -58,9 +58,6 @@ public interface ValueReader extends Closeable {
     return new String(buffer, 0, length, StandardCharsets.UTF_8);
   }
 
-  /// NOTE: The passed in reusable buffer should have capacity of at least 
`numBytesPerValue`.
-  String getPaddedString(int index, int numBytesPerValue, byte[] buffer);
-
   /// Reads the bytes into the given buffer and returns the length. Applicable 
to variable sized types other than
   /// STRING, i.e. BIG_DECIMAL, BYTES.
   /// NOTE: The passed in reusable buffer should have capacity of at least 
`numBytesPerValue`.
diff --git 
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/io/util/VarLengthValueReader.java
 
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/io/util/VarLengthValueReader.java
index c02cef995ec..2bd3565437c 100644
--- 
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/io/util/VarLengthValueReader.java
+++ 
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/io/util/VarLengthValueReader.java
@@ -96,11 +96,6 @@ public class VarLengthValueReader implements ValueReader {
     rangeList.add(new ForwardIndexReader.ByteRange(startOffset + baseOffset, 
length));
   }
 
-  @Override
-  public String getPaddedString(int index, int numBytesPerValue, byte[] 
buffer) {
-    throw new UnsupportedOperationException();
-  }
-
   @Override
   public int readBytes(int index, int numBytesPerValue, byte[] buffer) {
     assert buffer.length >= numBytesPerValue;
diff --git 
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/readers/BaseImmutableDictionary.java
 
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/readers/BaseImmutableDictionary.java
index 17171b12116..a99afacface 100644
--- 
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/readers/BaseImmutableDictionary.java
+++ 
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/readers/BaseImmutableDictionary.java
@@ -263,10 +263,6 @@ public abstract class BaseImmutableDictionary implements 
Dictionary {
     return _valueReader.getUnpaddedString(dictId, _numBytesPerValue, buffer);
   }
 
-  protected String getPaddedString(int dictId, byte[] buffer) {
-    return _valueReader.getPaddedString(dictId, _numBytesPerValue, buffer);
-  }
-
   protected int readBytes(int dictId, byte[] buffer) {
     return _valueReader.readBytes(dictId, _numBytesPerValue, buffer);
   }


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

Reply via email to