gianm commented on code in PR #11201:
URL: https://github.com/apache/druid/pull/11201#discussion_r1247261604


##########
extensions-core/datasketches/src/test/java/org/apache/druid/query/aggregation/datasketches/hll/sql/HllSketchSqlAggregatorTest.java:
##########
@@ -74,11 +78,123 @@
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
+import java.util.stream.Collectors;
 
 public class HllSketchSqlAggregatorTest extends BaseCalciteQueryTest
 {
   private static final boolean ROUND = true;
 
+  // For testHllSketchPostAggsGroupBy, testHllSketchPostAggsTimeseries
+  private static final Object[] EXPECTED_PA_RESULT =
+      new Object[]{
+          "\"AgEHDAMIAgDhUv8P63iABQ==\"",
+          "\"AgEHDAMIBgALpZ0PjpTfBY5ElQo+C7UE4jA+DKfcYQQ=\"",
+          "\"AgEHDAMIAQAr8vsG\"",
+          2.000000004967054d,
+          3.000000004967054d,
+          3.000000014901161d,
+          2.000000004967054d,
+          "[2.000000004967054,2.0,2.0001997319422404]",
+          "[2.000000004967054,2.0,2.000099863468538]",
+          "\"AgEHDAMIBgC1EYgH1mlHBwsKPwu5SK8MIiUxB7iZVwU=\"",
+          2L,
+          "### HLL SKETCH SUMMARY: \n"
+            + "  Log Config K   : 12\n"
+            + "  Hll Target     : HLL_4\n"
+            + "  Current Mode   : LIST\n"
+            + "  Memory         : false\n"
+            + "  LB             : 2.0\n"
+            + "  Estimate       : 2.000000004967054\n"
+            + "  UB             : 2.000099863468538\n"
+            + "  OutOfOrder Flag: false\n"
+            + "  Coupon Count   : 2\n",
+          "### HLL SKETCH SUMMARY: \n"
+            + "  LOG CONFIG K   : 12\n"
+            + "  HLL TARGET     : HLL_4\n"
+            + "  CURRENT MODE   : LIST\n"
+            + "  MEMORY         : FALSE\n"
+            + "  LB             : 2.0\n"
+            + "  ESTIMATE       : 2.000000004967054\n"
+            + "  UB             : 2.000099863468538\n"
+            + "  OUTOFORDER FLAG: FALSE\n"
+            + "  COUPON COUNT   : 2\n",
+          2.0
+      };
+
+  private static final List<VirtualColumn> EXPECTED_PA_VIRTUAL_COLUMNS =
+      ImmutableList.of(
+          new ExpressionVirtualColumn(
+              "v0",
+              "concat(\"dim2\",'hello')",
+              ColumnType.STRING,
+              TestExprMacroTable.INSTANCE
+          ),
+          new ExpressionVirtualColumn(
+              "v1",
+              "pow(abs((\"m1\" + 100)),2)",
+              ColumnType.DOUBLE,
+              TestExprMacroTable.INSTANCE
+          )
+      );
+
+  private static final List<AggregatorFactory> EXPECTED_PA_AGGREGATORS =

Review Comment:
   It refers to the test names where this is used, which have "postAggs" in 
them. I added a javadoc explaining what this is for.



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