emkornfield commented on code in PR #3124:
URL: https://github.com/apache/parquet-java/pull/3124#discussion_r1921092918


##########
parquet-column/src/main/java/org/apache/parquet/column/statistics/SizeStatistics.java:
##########
@@ -79,8 +87,12 @@ private Builder(PrimitiveType type, int maxRepetitionLevel, 
int maxDefinitionLev
      * @param definitionLevel definition level of the value
      */
     public void add(int repetitionLevel, int definitionLevel) {
-      repetitionLevelHistogram[repetitionLevel]++;
-      definitionLevelHistogram[definitionLevel]++;
+      if (repetitionLevelHistogram.length > 0) {

Review Comment:
   do we have benchmarks for this class?  I'm curious if there is a trade-off 
of always incrementing here and avoiding writing at the end (I suppose JVM 
might be smart enough to remove the conditionals so I'm fine keeping it as is).



-- 
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: issues-unsubscr...@parquet.apache.org

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


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

Reply via email to