You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2020/03/11 20:48:59 UTC

[GitHub] [incubator-pinot] mcvsubbu commented on a change in pull request #5137: Fix the default value provider classes

mcvsubbu commented on a change in pull request #5137: Fix the default value provider classes
URL: https://github.com/apache/incubator-pinot/pull/5137#discussion_r391256284
 
 

 ##########
 File path: pinot-core/src/main/java/org/apache/pinot/core/segment/index/readers/ConstantValueDoubleDictionary.java
 ##########
 @@ -19,20 +19,25 @@
 package org.apache.pinot.core.segment.index.readers;
 
 /**
- * Dictionary for constant-value double
+ * Dictionary of a single double value.
  */
-
 public class ConstantValueDoubleDictionary extends BaseImmutableDictionary {
-  final Double _value;
+  private final double _value;
 
-  public ConstantValueDoubleDictionary(Double value) {
+  public ConstantValueDoubleDictionary(double value) {
     super(1);
     _value = value;
   }
 
   @Override
   public int insertionIndexOf(String stringValue) {
-
+    double doubleValue = Double.parseDouble(stringValue);
+    if (doubleValue < _value) {
+      return -1;
+    }
+    if (doubleValue > _value) {
+      return -2;
 
 Review comment:
   I didnt knoiw we had this convention. The jacvadocs on insertionIndexOf() does not state this in comments. Also, it points to a binarysearch implementation that does not exist (or, I could not locate it).. Can you fix the comments to reflect this convention? thanks.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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