somandal commented on code in PR #8993:
URL: https://github.com/apache/pinot/pull/8993#discussion_r911302896


##########
pinot-core/src/test/java/org/apache/pinot/queries/MultiValueRawQueriesTest.java:
##########
@@ -338,6 +338,445 @@ public void testSelectQueries() {
     }
   }
 
+  @Test
+  public void testNonAggregateMVGroupBY() {
+    {
+      // TODO: Today ORDER BY on MV columns (irrespective of whether it's 
dictionary based or raw) doesn't work
+      //       Fix ORDER BY only for MV columns
+      String query = "SELECT mvFloatCol from testTable WHERE mvFloatCol < 5 
ORDER BY mvFloatCol LIMIT 10";
+      BrokerResponseNative brokerResponseNative = getBrokerResponse(query);
+      assertEquals(brokerResponseNative.getProcessingExceptions().size(), 2);
+    }
+    {
+      // Test a group by query on some raw MV rows. Order by on SV column 
added for determinism
+      String query = "SELECT svIntCol, mvRawFloatCol, mvRawDoubleCol, 
mvRawStringCol from testTable GROUP BY "
+          + "svIntCol, mvRawFloatCol, mvRawDoubleCol, mvRawStringCol ORDER BY 
svIntCol LIMIT 10";
+      ResultTable resultTable = getBrokerResponse(query).getResultTable();
+      assertNotNull(resultTable);
+      DataSchema dataSchema = new DataSchema(new String[]{
+          "svIntCol", "mvRawFloatCol", "mvRawDoubleCol", "mvRawStringCol"
+      }, new DataSchema.ColumnDataType[]{
+          DataSchema.ColumnDataType.INT, DataSchema.ColumnDataType.FLOAT, 
DataSchema.ColumnDataType.DOUBLE,
+          DataSchema.ColumnDataType.STRING
+      });
+      assertEquals(resultTable.getDataSchema(), dataSchema);
+      List<Object[]> recordRows = resultTable.getRows();
+      assertEquals(recordRows.size(), 10);
+
+      int[] expectedSVInts = new int[]{0, 0, 0, 0, 0, 0, 0, 0, 1, 1};

Review Comment:
   Modified this to add order by for all columns and then added validations for 
explicit values in each row. thanks for the suggestion!



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