use of com.linkedin.pinot.common.response.broker.BrokerResponseNative in project pinot by linkedin.
the class InterSegmentAggregationSingleValueQueriesTest method testDistinctCountHLL.
@Test
public void testDistinctCountHLL() {
String query = "SELECT DISTINCTCOUNTHLL(column1), DISTINCTCOUNTHLL(column3) FROM testTable";
BrokerResponseNative brokerResponse = getBrokerResponseForQuery(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 120000L, 0L, 240000L, 120000L, new String[] { "5977", "23825" });
brokerResponse = getBrokerResponseForQueryWithFilter(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 24516L, 336536L, 49032L, 120000L, new String[] { "1886", "4492" });
brokerResponse = getBrokerResponseForQuery(query + GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 120000L, 0L, 360000L, 120000L, new String[] { "3592", "11889" });
brokerResponse = getBrokerResponseForQueryWithFilter(query + GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 24516L, 336536L, 73548L, 120000L, new String[] { "1324", "3197" });
}
use of com.linkedin.pinot.common.response.broker.BrokerResponseNative in project pinot by linkedin.
the class InterSegmentAggregationSingleValueQueriesTest method testPercentileEst50.
@Test
public void testPercentileEst50() {
String query = "SELECT PERCENTILEEST50(column1), PERCENTILEEST50(column3) FROM testTable";
BrokerResponseNative brokerResponse = getBrokerResponseForQuery(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 120000L, 0L, 240000L, 120000L, new String[] { "1107310944", "1082130431" });
brokerResponse = getBrokerResponseForQueryWithFilter(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 24516L, 336536L, 49032L, 120000L, new String[] { "1139674505", "509607935" });
brokerResponse = getBrokerResponseForQuery(query + GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 120000L, 0L, 360000L, 120000L, new String[] { "2146791843", "2141451242" });
brokerResponse = getBrokerResponseForQueryWithFilter(query + GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 24516L, 336536L, 73548L, 120000L, new String[] { "2142595699", "999309554" });
}
use of com.linkedin.pinot.common.response.broker.BrokerResponseNative in project pinot by linkedin.
the class InterSegmentAggregationSingleValueQueriesTest method testPercentileEst99.
@Test
public void testPercentileEst99() {
String query = "SELECT PERCENTILEEST99(column1), PERCENTILEEST99(column3) FROM testTable";
BrokerResponseNative brokerResponse = getBrokerResponseForQuery(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 120000L, 0L, 240000L, 120000L, new String[] { "2143289343", "2143289343" });
brokerResponse = getBrokerResponseForQueryWithFilter(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 24516L, 336536L, 49032L, 120000L, new String[] { "2146232405", "991952895" });
brokerResponse = getBrokerResponseForQuery(query + GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 120000L, 0L, 360000L, 120000L, new String[] { "2146791843", "2147419555" });
brokerResponse = getBrokerResponseForQueryWithFilter(query + GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 24516L, 336536L, 73548L, 120000L, new String[] { "2146232405", "999309554" });
}
Aggregations