xiangfu0 commented on code in PR #11048:
URL: https://github.com/apache/pinot/pull/11048#discussion_r1254983729


##########
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/JsonPathClusterIntegrationTest.java:
##########
@@ -260,15 +260,19 @@ public void testComplexQueries()
       Assert.assertEquals(k4.get("k4-k3"), "value-k4-k3-" + seqId);
       Assert.assertEquals(Double.parseDouble(k4.get("met").toString()), 
Double.parseDouble(seqId));
     }
+  }
 
+  @Test
+  public void testComplexQueries2()
+      throws Exception {
     //Group By Query
-    query = "Select" + " jsonExtractScalar(complexMapStr,'$.k1','STRING'),"
+    String query = "Select" + " 
jsonExtractScalar(complexMapStr,'$.k1','STRING'),"
         + " sum(jsonExtractScalar(complexMapStr,'$.k4.met','INT'))" + " from " 
+ DEFAULT_TABLE_NAME
         + " group by jsonExtractScalar(complexMapStr,'$.k1','STRING')"
         + " order by sum(jsonExtractScalar(complexMapStr,'$.k4.met','INT')) 
DESC";
-    pinotResponse = postQuery(query);
+    JsonNode pinotResponse = postQuery(query);
     Assert.assertNotNull(pinotResponse.get("resultTable").get("rows"));
-    rows = (ArrayNode) pinotResponse.get("resultTable").get("rows");
+    ArrayNode rows = (ArrayNode) pinotResponse.get("resultTable").get("rows");
     for (int i = 0; i < rows.size(); i++) {
       String seqId = _sortedSequenceIds.get(NUM_TOTAL_DOCS - 1 - i);

Review Comment:
   Actually V1 results is wrong, when it's order by 
`sum(jsonExtractScalar(complexMapStr,'$.k4.met','INT'))`, the result is not in 
order of numbers, but LEX.



-- 
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: [email protected]

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