siddharthteotia commented on code in PR #10649:
URL: https://github.com/apache/pinot/pull/10649#discussion_r1171873534


##########
pinot-core/src/test/java/org/apache/pinot/core/query/aggregation/function/AggregationFunctionFactoryTest.java:
##########
@@ -255,25 +255,37 @@ public void testGetAggregationFunction() {
     aggregationFunction = 
AggregationFunctionFactory.getAggregationFunction(function, 
DUMMY_QUERY_CONTEXT);
     assertTrue(aggregationFunction instanceof 
PercentileTDigestAggregationFunction);
     assertEquals(aggregationFunction.getType(), 
AggregationFunctionType.PERCENTILETDIGEST);
-    assertEquals(aggregationFunction.getResultColumnName(), 
"percentiletdigest(column, 99.0)");
+    assertEquals(aggregationFunction.getResultColumnName(), 
"percentiletdigest(column, 99.0, 100.0)");
 
     function = getFunction("PeRcEnTiLeTdIgEsT", "(column, 99.9999)");
     aggregationFunction = 
AggregationFunctionFactory.getAggregationFunction(function, 
DUMMY_QUERY_CONTEXT);
     assertTrue(aggregationFunction instanceof 
PercentileTDigestAggregationFunction);
     assertEquals(aggregationFunction.getType(), 
AggregationFunctionType.PERCENTILETDIGEST);
-    assertEquals(aggregationFunction.getResultColumnName(), 
"percentiletdigest(column, 99.9999)");
+    assertEquals(aggregationFunction.getResultColumnName(), 
"percentiletdigest(column, 99.9999, 100.0)");
+
+    function = getFunction("PeRcEnTiLeTdIgEsT", "(column, 99.9999, 1000)");
+    aggregationFunction = 
AggregationFunctionFactory.getAggregationFunction(function, 
DUMMY_QUERY_CONTEXT);
+    assertTrue(aggregationFunction instanceof 
PercentileTDigestAggregationFunction);
+    assertEquals(aggregationFunction.getType(), 
AggregationFunctionType.PERCENTILETDIGEST);
+    assertEquals(aggregationFunction.getResultColumnName(), 
"percentiletdigest(column, 99.9999, 1000.0)");
 
     function = getFunction("PeRcEnTiLeRaWtDiGeSt", "(column, 99)");
     aggregationFunction = 
AggregationFunctionFactory.getAggregationFunction(function, 
DUMMY_QUERY_CONTEXT);
     assertTrue(aggregationFunction instanceof 
PercentileRawTDigestAggregationFunction);
     assertEquals(aggregationFunction.getType(), 
AggregationFunctionType.PERCENTILERAWTDIGEST);
-    assertEquals(aggregationFunction.getResultColumnName(), 
"percentilerawtdigest(column, 99.0)");
+    assertEquals(aggregationFunction.getResultColumnName(), 
"percentilerawtdigest(column, 99.0, 100.0)");

Review Comment:
   Why should the result column name change ? 
   
   If they never specified the comp factor in the argument, then they know it 
will default to whatever default compression factor and then no need to expose 
it to them via result column name. 
   
   If they specified the 3rd argument, then just like every function we include 
it as is in the result column name imo



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