use of com.linkedin.pinot.common.response.broker.BrokerResponseNative in project pinot by linkedin.
the class BrokerResponseNativeTest method testNullResponse.
@Test
public void testNullResponse() throws JSONException, IOException {
BrokerResponseNative expected = BrokerResponseNative.NO_TABLE_RESULT;
String brokerString = expected.toJsonString();
BrokerResponseNative actual = BrokerResponseNative.fromJsonString(brokerString);
Assert.assertEquals(actual.getProcessingExceptions().get(0).getErrorCode(), QueryException.BROKER_RESOURCE_MISSING_ERROR.getErrorCode());
Assert.assertEquals(actual.getProcessingExceptions().get(0).getMessage(), QueryException.BROKER_RESOURCE_MISSING_ERROR.getMessage());
}
use of com.linkedin.pinot.common.response.broker.BrokerResponseNative in project pinot by linkedin.
the class InterSegmentAggregationMultiValueQueriesTest method testMinMV.
@Test
public void testMinMV() {
String query = "SELECT MINMV(column6) FROM testTable";
BrokerResponseNative brokerResponse = getBrokerResponseForQuery(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 400000L, 0L, 400000L, 400000L, new String[] { "1001.00000" });
brokerResponse = getBrokerResponseForQueryWithFilter(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 62480L, 1129720L, 62480L, 400000L, new String[] { "1009.00000" });
brokerResponse = getBrokerResponseForQuery(query + SV_GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 400000L, 0L, 800000L, 400000L, new String[] { "1001.00000" });
brokerResponse = getBrokerResponseForQuery(query + MV_GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 400000L, 0L, 800000L, 400000L, new String[] { "1001.00000" });
}
use of com.linkedin.pinot.common.response.broker.BrokerResponseNative in project pinot by linkedin.
the class InterSegmentAggregationMultiValueQueriesTest method testDistinctCountMV.
@Test
public void testDistinctCountMV() {
String query = "SELECT DISTINCTCOUNTMV(column6) FROM testTable";
BrokerResponseNative brokerResponse = getBrokerResponseForQuery(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 400000L, 0L, 400000L, 400000L, new String[] { "18499" });
brokerResponse = getBrokerResponseForQueryWithFilter(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 62480L, 1129720L, 62480L, 400000L, new String[] { "1186" });
brokerResponse = getBrokerResponseForQuery(query + SV_GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 400000L, 0L, 800000L, 400000L, new String[] { "4784" });
brokerResponse = getBrokerResponseForQuery(query + MV_GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 400000L, 0L, 800000L, 400000L, new String[] { "3434" });
}
use of com.linkedin.pinot.common.response.broker.BrokerResponseNative in project pinot by linkedin.
the class InterSegmentAggregationMultiValueQueriesTest method testPercentile90MV.
@Test
public void testPercentile90MV() {
String query = "SELECT PERCENTILE90MV(column6) FROM testTable";
BrokerResponseNative brokerResponse = getBrokerResponseForQuery(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 400000L, 0L, 400000L, 400000L, new String[] { "2147483647.00000" });
brokerResponse = getBrokerResponseForQueryWithFilter(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 62480L, 1129720L, 62480L, 400000L, new String[] { "2147483647.00000" });
brokerResponse = getBrokerResponseForQuery(query + SV_GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 400000L, 0L, 800000L, 400000L, new String[] { "2147483647.00000" });
brokerResponse = getBrokerResponseForQuery(query + MV_GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 400000L, 0L, 800000L, 400000L, new String[] { "2147483647.00000" });
}
use of com.linkedin.pinot.common.response.broker.BrokerResponseNative in project pinot by linkedin.
the class InterSegmentAggregationMultiValueQueriesTest method testDistinctCountHLLMV.
@Test
public void testDistinctCountHLLMV() {
String query = "SELECT DISTINCTCOUNTHLLMV(column6) FROM testTable";
BrokerResponseNative brokerResponse = getBrokerResponseForQuery(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 400000L, 0L, 400000L, 400000L, new String[] { "20039" });
brokerResponse = getBrokerResponseForQueryWithFilter(query);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 62480L, 1129720L, 62480L, 400000L, new String[] { "1296" });
brokerResponse = getBrokerResponseForQuery(query + SV_GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 400000L, 0L, 800000L, 400000L, new String[] { "4715" });
brokerResponse = getBrokerResponseForQuery(query + MV_GROUP_BY);
QueriesTestUtils.verifyAggregationResult(brokerResponse, 400000L, 0L, 800000L, 400000L, new String[] { "3490" });
}
Aggregations