siddharthteotia commented on code in PR #8993:
URL: https://github.com/apache/pinot/pull/8993#discussion_r910675440
##########
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:
Curious if this is enough to ensure the correctness of the values in MV
columns in the ResultTable ? Should we not assert / check for those columns as
well ?
--
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]