use of com.linkedin.pinot.common.response.broker.BrokerResponseNative in project pinot by linkedin.
the class InterSegmentAggregationSingleValueQueriesTest method testPercentile95.
@Test
public void testPercentile95() {
String query = "SELECT PERCENTILE95(column1), PERCENTILE95(column3) FROM testTable";
BrokerResponseNative brokerResponse = getBrokerResponseForQuery(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 120000L, 0L, 240000L, 120000L, new String[] { "2071559385.00000", "2042409652.00000" });
brokerResponse = getBrokerResponseForQueryWithFilter(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 24516L, 336536L, 49032L, 120000L, new String[] { "2096857943.00000", "947763150.00000" });
brokerResponse = getBrokerResponseForQuery(query + GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 120000L, 0L, 360000L, 120000L, new String[] { "2146791843.00000", "2147419555.00000" });
brokerResponse = getBrokerResponseForQueryWithFilter(query + GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 24516L, 336536L, 73548L, 120000L, new String[] { "2142595699.00000", "999309554.00000" });
}
use of com.linkedin.pinot.common.response.broker.BrokerResponseNative in project pinot by linkedin.
the class InterSegmentAggregationSingleValueQueriesTest method testAvg.
@Test
public void testAvg() {
String query = "SELECT AVG(column1), AVG(column3) FROM testTable";
BrokerResponseNative brokerResponse = getBrokerResponseForQuery(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 120000L, 0L, 240000L, 120000L, new String[] { "1077239514.59490", "1076305306.30500" });
brokerResponse = getBrokerResponseForQueryWithFilter(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 24516L, 336536L, 49032L, 120000L, new String[] { "1121871038.68037", "506982332.96280" });
brokerResponse = getBrokerResponseForQuery(query + GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 120000L, 0L, 360000L, 120000L, new String[] { "2142595699.00000", "2141451242.00000" });
brokerResponse = getBrokerResponseForQueryWithFilter(query + GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 24516L, 336536L, 73548L, 120000L, new String[] { "2142595699.00000", "999309554.00000" });
}
use of com.linkedin.pinot.common.response.broker.BrokerResponseNative in project pinot by linkedin.
the class InterSegmentAggregationSingleValueQueriesTest method testPercentileEst95.
@Test
public void testPercentileEst95() {
String query = "SELECT PERCENTILEEST95(column1), PERCENTILEEST95(column3) FROM testTable";
BrokerResponseNative brokerResponse = getBrokerResponseForQuery(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 120000L, 0L, 240000L, 120000L, new String[] { "2080374783", "2051014655" });
brokerResponse = getBrokerResponseForQueryWithFilter(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 24516L, 336536L, 49032L, 120000L, new String[] { "2109734911", "950009855" });
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[] { "2142595699", "999309554" });
}
use of com.linkedin.pinot.common.response.broker.BrokerResponseNative in project pinot by linkedin.
the class InterSegmentAggregationSingleValueQueriesTest method testPercentileEst90.
@Test
public void testPercentileEst90() {
String query = "SELECT PERCENTILEEST90(column1), PERCENTILEEST90(column3) FROM testTable";
BrokerResponseNative brokerResponse = getBrokerResponseForQuery(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 120000L, 0L, 240000L, 120000L, new String[] { "1946157055", "1946157055" });
brokerResponse = getBrokerResponseForQueryWithFilter(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 24516L, 336536L, 49032L, 120000L, new String[] { "1939865599", "902299647" });
brokerResponse = getBrokerResponseForQuery(query + GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 120000L, 0L, 360000L, 120000L, new String[] { "2146791843", "2147278341" });
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 testCount.
@Test
public void testCount() {
String query = "SELECT COUNT(*) FROM testTable";
BrokerResponseNative brokerResponse = getBrokerResponseForQuery(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 120000L, 0L, 0L, 120000L, new String[] { "120000" });
brokerResponse = getBrokerResponseForQueryWithFilter(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 24516L, 336536L, 0L, 120000L, new String[] { "24516" });
brokerResponse = getBrokerResponseForQuery(query + GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 120000L, 0L, 120000L, 120000L, new String[] { "64420" });
brokerResponse = getBrokerResponseForQueryWithFilter(query + GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 24516L, 336536L, 24516L, 120000L, new String[] { "17080" });
}
Aggregations