use of com.linkedin.pinot.common.response.broker.BrokerResponseNative in project pinot by linkedin.
the class InterSegmentAggregationSingleValueQueriesTest method testDistinctCount.
@Test
public void testDistinctCount() {
String query = "SELECT DISTINCTCOUNT(column1), DISTINCTCOUNT(column3) FROM testTable";
BrokerResponseNative brokerResponse = getBrokerResponseForQuery(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 120000L, 0L, 240000L, 120000L, new String[] { "6582", "21910" });
brokerResponse = getBrokerResponseForQueryWithFilter(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 24516L, 336536L, 49032L, 120000L, new String[] { "1872", "4556" });
brokerResponse = getBrokerResponseForQuery(query + GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 120000L, 0L, 360000L, 120000L, new String[] { "3495", "11961" });
brokerResponse = getBrokerResponseForQueryWithFilter(query + GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 24516L, 336536L, 73548L, 120000L, new String[] { "1272", "3289" });
}
use of com.linkedin.pinot.common.response.broker.BrokerResponseNative in project pinot by linkedin.
the class InterSegmentAggregationSingleValueQueriesTest method testMax.
@Test
public void testMax() {
String query = "SELECT MAX(column1), MAX(column3) FROM testTable";
BrokerResponseNative brokerResponse = getBrokerResponseForQuery(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 120000L, 0L, 240000L, 120000L, new String[] { "2146952047.00000", "2147419555.00000" });
brokerResponse = getBrokerResponseForQueryWithFilter(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 24516L, 336536L, 49032L, 120000L, new String[] { "2146952047.00000", "999813884.00000" });
brokerResponse = getBrokerResponseForQuery(query + GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 120000L, 0L, 360000L, 120000L, new String[] { "2146952047.00000", "2147419555.00000" });
brokerResponse = getBrokerResponseForQueryWithFilter(query + GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 24516L, 336536L, 73548L, 120000L, new String[] { "2146952047.00000", "999813884.00000" });
}
use of com.linkedin.pinot.common.response.broker.BrokerResponseNative in project pinot by linkedin.
the class InterSegmentAggregationSingleValueQueriesTest method testMin.
@Test
public void testMin() {
String query = "SELECT MIN(column1), MIN(column3) FROM testTable";
BrokerResponseNative brokerResponse = getBrokerResponseForQuery(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 120000L, 0L, 240000L, 120000L, new String[] { "240528.00000", "17891.00000" });
brokerResponse = getBrokerResponseForQueryWithFilter(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 24516L, 336536L, 49032L, 120000L, new String[] { "101116473.00000", "20396372.00000" });
brokerResponse = getBrokerResponseForQuery(query + GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 120000L, 0L, 360000L, 120000L, new String[] { "240528.00000", "17891.00000" });
brokerResponse = getBrokerResponseForQueryWithFilter(query + GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 24516L, 336536L, 73548L, 120000L, new String[] { "101116473.00000", "20396372.00000" });
}
use of com.linkedin.pinot.common.response.broker.BrokerResponseNative in project pinot by linkedin.
the class InterSegmentAggregationSingleValueQueriesTest method testPercentile90.
@Test
public void testPercentile90() {
String query = "SELECT PERCENTILE90(column1), PERCENTILE90(column3) FROM testTable";
BrokerResponseNative brokerResponse = getBrokerResponseForQuery(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 120000L, 0L, 240000L, 120000L, new String[] { "1943040511.00000", "1936611145.00000" });
brokerResponse = getBrokerResponseForQueryWithFilter(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 24516L, 336536L, 49032L, 120000L, new String[] { "1936730975.00000", "899534534.00000" });
brokerResponse = getBrokerResponseForQuery(query + GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 120000L, 0L, 360000L, 120000L, new String[] { "2146791843.00000", "2147278341.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 testMinMaxRange.
@Test
public void testMinMaxRange() {
String query = "SELECT MINMAXRANGE(column1), MINMAXRANGE(column3) FROM testTable";
BrokerResponseNative brokerResponse = getBrokerResponseForQuery(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 120000L, 0L, 240000L, 120000L, new String[] { "2146711519.00000", "2147401664.00000" });
brokerResponse = getBrokerResponseForQueryWithFilter(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 24516L, 336536L, 49032L, 120000L, new String[] { "2045835574.00000", "979417512.00000" });
brokerResponse = getBrokerResponseForQuery(query + GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 120000L, 0L, 360000L, 120000L, new String[] { "2146711519.00000", "2146612605.00000" });
brokerResponse = getBrokerResponseForQueryWithFilter(query + GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 24516L, 336536L, 73548L, 120000L, new String[] { "2044094181.00000", "979417512.00000" });
}
Aggregations