walterddr commented on code in PR #11117: URL: https://github.com/apache/pinot/pull/11117#discussion_r1270810293
########## pinot-common/src/main/java/org/apache/pinot/common/function/TransformFunctionType.java: ########## @@ -90,6 +90,11 @@ public enum TransformFunctionType { // date type conversion functions CAST("cast"), + // object type + ARRAY_TO_MV("arrayToMV", Review Comment: IMO this is confusing name. the data type is already MV running an ARRAY_TO_MV is a bit weird. should we named it `USE_AS_MV`? and we can say that MV columns are by default `USE_AS_ARRAY` ########## pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/MultiStageEngineIntegrationTest.java: ########## @@ -485,6 +486,25 @@ public void testLiteralOnlyFunc() assertEquals(results.get(10).asText(), "hello!"); } + @Test + public void testMultiValueColumnGroupBy() + throws Exception { + String pinotQuery = "SELECT count(*), arrayToMV(RandomAirports) FROM mytable " + + "GROUP BY arrayToMV(RandomAirports)"; + JsonNode jsonNode = postQuery(pinotQuery); + Assert.assertEquals(jsonNode.get("resultTable").get("rows").size(), 154); + } + + @Test + public void testMultiValueColumnGroupByOrderBy() + throws Exception { + String pinotQuery = "SELECT count(*), arrayToMV(RandomAirports) FROM mytable " Review Comment: will it work if I run ``` SELECT count(*), arrayToMV(RandomAirports) FROM mytable WHERE Dest IN (SELECT Dest FROM myTable GROUP BY Dest HAVING count(*) > 10) ``` (later when we implemented the scalar function wrapper) ########## pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/MultiStageEngineIntegrationTest.java: ########## @@ -485,6 +486,25 @@ public void testLiteralOnlyFunc() assertEquals(results.get(10).asText(), "hello!"); } + @Test + public void testMultiValueColumnGroupBy() + throws Exception { + String pinotQuery = "SELECT count(*), arrayToMV(RandomAirports) FROM mytable " Review Comment: BaseIntegrationTestSets also have (1) hard-coded MV tests queries; and (2) withMultiValue flag in generated queries should we turn them on? -- 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