lakshmanan-v commented on a change in pull request #7226: URL: https://github.com/apache/pinot/pull/7226#discussion_r695138853
########## File path: pinot-common/src/test/java/org/apache/pinot/common/function/AggregationFunctionTypeTest.java ########## @@ -48,6 +48,12 @@ public void testGetAggregationFunctionType() { AggregationFunctionType.PERCENTILEEST); Assert.assertEquals(AggregationFunctionType.getAggregationFunctionType("PeRcEnTiLeTdIgEsT99"), AggregationFunctionType.PERCENTILETDIGEST); + Assert Review comment: Updated. ########## File path: pinot-segment-local/src/main/java/org/apache/pinot/segment/local/customobject/SerializedQuantileDigest.java ########## @@ -0,0 +1,49 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.pinot.segment.local.customobject; + +import org.apache.pinot.segment.local.utils.CustomSerDeUtils; +import org.apache.pinot.spi.utils.BytesUtils; + +import static com.google.common.base.Preconditions.checkArgument; + +/** + * Serialized and comparable version of QuantileDigest. Compares QuantileDigest for a specific percentile value. + */ +public class SerializedQuantileDigest implements Comparable<SerializedQuantileDigest> { + private final double _percentile; + private final QuantileDigest _quantileDigest; + + public SerializedQuantileDigest(QuantileDigest quantileDigest, double percentile) { + _quantileDigest = quantileDigest; + _percentile = percentile; + } + + @Override + public int compareTo(SerializedQuantileDigest other) { + checkArgument(other._percentile == _percentile, "Percentile number doesn't match!"); + return Double.compare(_quantileDigest.getQuantile(_percentile / 100.0), Review comment: Updated. -- 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