Jackie-Jiang commented on a change in pull request #7325:
URL: https://github.com/apache/pinot/pull/7325#discussion_r694157422



##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/util/SortedRangeIntersection.java
##########
@@ -60,27 +62,28 @@
         }
       }
       // move all pointers forward such that range they point to contain 
maxHead
-      for (int i = 0; i < sortedRangeSetList.size(); i++) {
-        if (i == maxHeadIndex) {
+      int j = -1;

Review comment:
       Why do we need to change this?

##########
File path: 
pinot-core/src/test/java/org/apache/pinot/core/operator/transform/function/GroovyTransformFunctionTest.java
##########
@@ -45,29 +45,35 @@
     List<Object[]> inputs = new ArrayList<>();
 
     // max in array (returns SV INT)
+    //CHECKSTYLE:OFF

Review comment:
       Why do we need to turn it off?

##########
File path: 
pinot-core/src/test/java/org/apache/pinot/core/operator/filter/predicate/RangeOfflineDictionaryPredicateEvaluatorTest.java
##########
@@ -35,7 +35,8 @@
 
   @Test
   public void testRanges() {
-    int rangeStart, rangeEnd;
+    int rangeStart;

Review comment:
       (nit) Move them into each block?

##########
File path: 
pinot-core/src/test/java/org/apache/pinot/core/data/table/TableResizerTest.java
##########
@@ -65,11 +65,47 @@
   public void setUp() {
     //@formatter:off

Review comment:
       Can we remove this annotation?

##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/GroovyTransformFunction.java
##########
@@ -41,6 +41,7 @@
 
 
 /**
+ * CHECKSTYLE:OFF

Review comment:
       Why is this needed?

##########
File path: 
pinot-core/src/test/java/org/apache/pinot/queries/DistinctQueriesTest.java
##########
@@ -601,9 +612,23 @@ public void testDistinctInnerSegment() {
   @Test
   public void testNonAggGroupByRewriteToDistinctInnerSegment() {
     //@formatter:off
+    //CHECKSTYLE:OFF

Review comment:
       Same

##########
File path: 
pinot-core/src/test/java/org/apache/pinot/queries/DistinctQueriesTest.java
##########
@@ -582,7 +582,18 @@ private void testDistinctInnerSegmentHelper(String[] 
queries, boolean isPql) {
   public void testDistinctInnerSegment() {
     //@formatter:off
     testDistinctInnerSegmentHelper(
-        new String[]{"SELECT DISTINCT(intColumn, longColumn, floatColumn, 
doubleColumn, stringColumn, bytesColumn) FROM testTable LIMIT 10000", "SELECT 
DISTINCT(stringColumn, bytesColumn, floatColumn) FROM testTable WHERE intColumn 
>= 60 LIMIT 10000", "SELECT DISTINCT(intColumn, rawBytesColumn) FROM testTable 
ORDER BY rawBytesColumn LIMIT 5", "SELECT DISTINCT(ADD(intColumn, floatColumn), 
stringColumn) FROM testTable WHERE longColumn < 60 ORDER BY stringColumn DESC, 
ADD(intColumn, floatColumn) ASC LIMIT 10", "SELECT DISTINCT(floatColumn, 
longColumn) FROM testTable WHERE stringColumn = 'a' ORDER BY longColumn LIMIT 
10"},
+        new String[] {
+            //CHECKSTYLE:OFF

Review comment:
       Do we need it?

##########
File path: 
pinot-core/src/test/java/org/apache/pinot/queries/DistinctQueriesTest.java
##########
@@ -582,7 +582,18 @@ private void testDistinctInnerSegmentHelper(String[] 
queries, boolean isPql) {
   public void testDistinctInnerSegment() {
     //@formatter:off

Review comment:
       Can we remove this?

##########
File path: 
pinot-core/src/test/java/org/apache/pinot/core/data/table/TableResizerTest.java
##########
@@ -65,11 +65,47 @@
   public void setUp() {
     //@formatter:off
     _records = Arrays.asList(
-        new Record(new Object[]{"a", 10, 1.0, 10.0, 100.0, new 
IntOpenHashSet(new int[]{1}), new AvgPair(10, 2) /* 5 */}),
-        new Record(new Object[]{"b", 10, 2.0, 20.0, 200.0, new 
IntOpenHashSet(new int[]{1, 2}), new AvgPair(10, 3) /* 3.33 */}),
-        new Record(new Object[]{"c", 200, 3.0, 30.0, 300.0, new 
IntOpenHashSet(new int[]{1, 2}), new AvgPair(20, 4) /* 5 */}),
-        new Record(new Object[]{"c", 50, 4.0, 30.0, 200.0, new 
IntOpenHashSet(new int[]{1, 2, 3}), new AvgPair(30, 10) /* 3 */}),
-        new Record(new Object[]{"c", 300, 5.0, 20.0, 100.0, new 
IntOpenHashSet(new int[]{1, 2, 3, 4}), new AvgPair(10, 5) /* 2 */})
+        new Record(new Object[]{
+            "a",

Review comment:
       Don't need to fully expand it

##########
File path: 
pinot-core/src/test/java/org/apache/pinot/core/operator/transform/function/CaseTransformFunctionTest.java
##########
@@ -29,6 +29,7 @@
 
 
 public class CaseTransformFunctionTest extends BaseTransformFunctionTest {
+

Review comment:
       (nit) remove

##########
File path: 
pinot-core/src/test/java/org/apache/pinot/core/operator/transform/function/GroovyTransformFunctionTest.java
##########
@@ -45,29 +45,35 @@
     List<Object[]> inputs = new ArrayList<>();
 
     // max in array (returns SV INT)
+    //CHECKSTYLE:OFF
     groovyTransformFunction = String
         .format("groovy('{\"returnType\":\"INT\", \"isSingleValue\":true}', " 
+ "'arg0.toList().max()', " + "%s)",

Review comment:
       Remove the string concat? Same for other places

##########
File path: 
pinot-core/src/test/java/org/apache/pinot/core/query/pruner/SelectionQuerySegmentPrunerTest.java
##########
@@ -99,8 +99,7 @@ public void testSelectionOnly() {
 
   @Test
   public void testSelectionOrderBy() {
-    List<IndexSegment> indexSegments = Arrays.asList( //
-        getIndexSegment(0L, 10L, 10),     // 0
+    List<IndexSegment> indexSegments = Arrays.asList(getIndexSegment(0L, 10L, 
10),     // 0

Review comment:
       Move this to next line?




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