You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "jasperjiaguo (via GitHub)" <gi...@apache.org> on 2023/04/19 21:23:18 UTC

[GitHub] [pinot] jasperjiaguo commented on a diff in pull request #10649: Add support for custom compression factor for Percentile TDigest aggregation functions

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


##########
pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/PercentileRawTDigestAggregationFunction.java:
##########
@@ -59,11 +64,12 @@ public AggregationFunctionType getType() {
   @Override
   public String getResultColumnName() {
     final double percentile = _percentileTDigestAggregationFunction._percentile;
+    final double compressionFactor = _percentileTDigestAggregationFunction._compressionFactor;
     final int version = _percentileTDigestAggregationFunction._version;
     final String type = getType().getName().toLowerCase();
 
     return version == 0 ? type + (int) percentile + "(" + _expression + ")"
-        : type + "(" + _expression + ", " + percentile + ")";
+        : type + "(" + _expression + ", " + percentile + ", " + compressionFactor + ")";

Review Comment:
   Would this change break some existing readers depending on this column name? 



##########
pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/PercentileTDigestAggregationFunction.java:
##########
@@ -38,21 +38,32 @@
 public class PercentileTDigestAggregationFunction extends BaseSingleInputAggregationFunction<TDigest, Double> {

Review Comment:
   Can we update the user doc with some very simple instructions eg "typically compression=100 is used. But the user can use higher compression for more accurate results, with higher memory consumption."



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