You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "klsince (via GitHub)" <gi...@apache.org> on 2023/07/07 20:05:20 UTC

[GitHub] [pinot] klsince commented on a diff in pull request #11059: Replace Long attributes with primitive values to reduce boxing

klsince commented on code in PR #11059:
URL: https://github.com/apache/pinot/pull/11059#discussion_r1256401793


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/fst/PinotBufferIndexInput.java:
##########
@@ -31,11 +31,11 @@
  */
 public class PinotBufferIndexInput extends IndexInput {
   private final PinotDataBuffer _pinotDataBuffer;
-  private final Long _sliceOffset;
-  private final Long _length;
-  private Long _readPointerOffset;
+  private final long _sliceOffset;
+  private final long _length;
+  private long _readPointerOffset;
 
-  public PinotBufferIndexInput(PinotDataBuffer pinotDataBuffer, Long offset, Long length) {
+  public PinotBufferIndexInput(PinotDataBuffer pinotDataBuffer, long offset, long length) {

Review Comment:
   👍 
   
   Looks like this class is only used to read text index. btw, I spotted that at L76 below, `Byte` was used and could be changed to `byte`.



##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/fst/PinotBufferIndexInput.java:
##########
@@ -31,11 +31,11 @@
  */
 public class PinotBufferIndexInput extends IndexInput {
   private final PinotDataBuffer _pinotDataBuffer;
-  private final Long _sliceOffset;
-  private final Long _length;
-  private Long _readPointerOffset;
+  private final long _sliceOffset;
+  private final long _length;
+  private long _readPointerOffset;
 
-  public PinotBufferIndexInput(PinotDataBuffer pinotDataBuffer, Long offset, Long length) {
+  public PinotBufferIndexInput(PinotDataBuffer pinotDataBuffer, long offset, long length) {

Review Comment:
   👍 
   
   Looks like this class is only used to read text index. btw, I spotted that at L76 below, `Byte` was used and could be changed to `byte`.



-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org