You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/11/28 18:25:25 UTC

[GitHub] [pinot] walterddr commented on a diff in pull request #9848: support BOOL_AND and BOOL_OR aggregate functions

walterddr commented on code in PR #9848:
URL: https://github.com/apache/pinot/pull/9848#discussion_r1033905183


##########
pinot-core/src/test/java/org/apache/pinot/core/query/aggregation/function/AggregationFunctionFactoryTest.java:
##########
@@ -444,6 +444,20 @@ public void testGetAggregationFunction() {
     assertEquals(aggregationFunction.getType(), AggregationFunctionType.PERCENTILETDIGESTMV);
     assertEquals(aggregationFunction.getColumnName(), "percentileTDigest95.0MV_column");
     assertEquals(aggregationFunction.getResultColumnName(), "percentiletdigestmv(column, 95.0)");
+
+    function = getFunction("bool_and");

Review Comment:
   since we are adding this feature to V1 as well. we should add test for them in V1 too. see: https://github.com/apache/pinot/pull/9236 when adding COVAR_POP
   



##########
pinot-query-runtime/src/test/resources/queries/Aggregates.json:
##########
@@ -164,85 +117,38 @@
         "comments": "class java.lang.Double cannot be cast to class java.lang.Boolean",
         "description": "aggregate boolean column",
         "sql": "SELECT min(bool_col) FROM {tbl}"
+      },
+      {
+        "psql": "9.21.0",
+        "description": "aggregate boolean column",
+        "sql": "SELECT bool_and(bool_col), bool_or(bool_col) FROM {tbl} GROUP BY string_col"
+      },
+      {
+        "psql": "9.21.0",
+        "description": "aggregate boolean column no group by",
+        "sql": "SELECT bool_and(bool_col), bool_or(bool_col) FROM {tbl}"

Review Comment:
   do we support `SELECT bool_and(startsWith(string_col, 'foo')) FROM ...` ?
   can we add a test for these type of use case?



-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org