vvivekiyer commented on code in PR #13717:
URL: https://github.com/apache/pinot/pull/13717#discussion_r1698823987


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/realtime/impl/forward/FixedByteSVMutableForwardIndex.java:
##########
@@ -81,7 +81,10 @@ public FixedByteSVMutableForwardIndex(boolean 
dictionaryEncoded, DataType stored
       _valueSizeInBytes = storedType.size();
     }
     _numRowsPerChunk = numRowsPerChunk;
-    _chunkSizeInBytes = numRowsPerChunk * _valueSizeInBytes;
+    _chunkSizeInBytes = (long) numRowsPerChunk * _valueSizeInBytes;

Review Comment:
   Thanks for the fix. We have the same issue in a few other places (eg: 
[FixedByteSingleValueMultiColumnReaderWriter.java](https://github.com/apache/pinot/blob/dd8a6477c22e761a2a6dc3264b9c2a86c94427fd/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/io/readerwriter/impl/FixedByteSingleValueMultiColumnReaderWriter.java#L77)).
 Can we search and fix other occurences as well?



##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/realtime/impl/forward/FixedByteSVMutableForwardIndex.java:
##########
@@ -81,7 +81,10 @@ public FixedByteSVMutableForwardIndex(boolean 
dictionaryEncoded, DataType stored
       _valueSizeInBytes = storedType.size();
     }
     _numRowsPerChunk = numRowsPerChunk;
-    _chunkSizeInBytes = numRowsPerChunk * _valueSizeInBytes;
+    _chunkSizeInBytes = (long) numRowsPerChunk * _valueSizeInBytes;
+    Preconditions.checkState(_chunkSizeInBytes < Integer.MAX_VALUE,

Review Comment:
   Instead of a precondition here, we should perhaps understand what table 
configuration led to this and restrict this at the source. What do you think? 



-- 
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-unsubscr...@pinot.apache.org

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


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

Reply via email to