mayankshriv commented on a change in pull request #7226: URL: https://github.com/apache/pinot/pull/7226#discussion_r687267355
########## File path: pinot-core/src/test/java/org/apache/pinot/queries/InterSegmentAggregationMultiValueQueriesTest.java ########## @@ -519,6 +519,119 @@ public void testPercentileEst99MV() { .testInterSegmentAggregationResult(brokerResponse, 400000L, 0L, 800000L, 400000L, new String[]{"2147483647"}); } + @Test + public void testPercentileRawEst50MV() { + testPercentileEstAggregationResult(50); + } + + @Test + public void testPercentileRawEst90MV() { + testPercentileEstAggregationResult(90); + } + + @Test + public void testPercentileRawEst95MV() { + testPercentileEstAggregationResult(95); + } + + @Test + public void testPercentileRawEst99MV() { + testPercentileEstAggregationResult(99); + } + + private void testPercentileEstAggregationResult(int percentile) { + + Function<Serializable, String> quantileExtractor = value -> String.valueOf(ObjectSerDeUtils.QUANTILE_DIGEST_SER_DE.deserialize(BytesUtils.toBytes((String) value)) + .getQuantile((double) percentile / 100.0)); + + ExpectedQueryResult<Long> expectedQueryResultsBasic = Review comment: I was thinking we should modify the tests as follows: 1. Run a query with non raw version - get the result 2. Run the same query with raw version - deserialize - get the result 3. Assert that results from 1 and 2 should be exact match. This will take away any hardcoding as well as needing to check if the results is within a % margin. -- 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