gianm commented on a change in pull request #11004:
URL: https://github.com/apache/druid/pull/11004#discussion_r597095389



##########
File path: 
processing/src/test/java/org/apache/druid/segment/data/VSizeLongSerdeTest.java
##########
@@ -20,132 +20,352 @@
 package org.apache.druid.segment.data;
 
 
+import com.google.common.primitives.Ints;
+import org.apache.druid.java.util.common.StringUtils;
 import org.junit.Assert;
-import org.junit.Before;
 import org.junit.Test;
+import org.junit.experimental.runners.Enclosed;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.nio.ByteBuffer;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.stream.Collectors;
 
+@RunWith(Enclosed.class)
 public class VSizeLongSerdeTest

Review comment:
       It doesn't really matter much if the methods are being called correctly 
today. The purpose of the checks is in case someone starts calling these 
methods incorrectly in the future.
   
   I would imagine the overhead is minimal given that LongSerializers are doing 
a single write per method call. (A precondition check shouldn't add much on top 
of the method call overhead that's already there, especially since the branch 
would be 100% predictable.)
   
   If it turns out that the overhead is worth worrying about, then I'd add an 
assert instead of a regular precondition check. The assert would be skipped in 
production but will run during tests.




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to