Search in sources :

Example 6 with BrokerResponseNative

use of com.linkedin.pinot.common.response.broker.BrokerResponseNative in project pinot by linkedin.

the class InterSegmentAggregationMultiValueQueriesTest method testMaxMV.

@Test
public void testMaxMV() {
    String query = "SELECT MAXMV(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" });
}
Also used : BrokerResponseNative(com.linkedin.pinot.common.response.broker.BrokerResponseNative) Test(org.testng.annotations.Test)

Example 7 with BrokerResponseNative

use of com.linkedin.pinot.common.response.broker.BrokerResponseNative in project pinot by linkedin.

the class InterSegmentAggregationMultiValueQueriesTest method testPercentile99MV.

@Test
public void testPercentile99MV() {
    String query = "SELECT PERCENTILE99MV(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" });
}
Also used : BrokerResponseNative(com.linkedin.pinot.common.response.broker.BrokerResponseNative) Test(org.testng.annotations.Test)

Example 8 with BrokerResponseNative

use of com.linkedin.pinot.common.response.broker.BrokerResponseNative in project pinot by linkedin.

the class InterSegmentAggregationMultiValueQueriesTest method testPercentileEst99MV.

@Test
public void testPercentileEst99MV() {
    String query = "SELECT PERCENTILEEST99MV(column6) FROM testTable";
    BrokerResponseNative brokerResponse = getBrokerResponseForQuery(query);
    QueriesTestUtils.verifyAggregationResult(brokerResponse, 400000L, 0L, 400000L, 400000L, new String[] { "2147483647" });
    brokerResponse = getBrokerResponseForQueryWithFilter(query);
    QueriesTestUtils.verifyAggregationResult(brokerResponse, 62480L, 1129720L, 62480L, 400000L, new String[] { "2147483647" });
    brokerResponse = getBrokerResponseForQuery(query + SV_GROUP_BY);
    QueriesTestUtils.verifyAggregationResult(brokerResponse, 400000L, 0L, 800000L, 400000L, new String[] { "2147483647" });
    brokerResponse = getBrokerResponseForQuery(query + MV_GROUP_BY);
    QueriesTestUtils.verifyAggregationResult(brokerResponse, 400000L, 0L, 800000L, 400000L, new String[] { "2147483647" });
}
Also used : BrokerResponseNative(com.linkedin.pinot.common.response.broker.BrokerResponseNative) Test(org.testng.annotations.Test)

Example 9 with BrokerResponseNative

use of com.linkedin.pinot.common.response.broker.BrokerResponseNative in project pinot by linkedin.

the class InterSegmentAggregationMultiValueQueriesTest method testPercentileEst90MV.

@Test
public void testPercentileEst90MV() {
    String query = "SELECT PERCENTILEEST90MV(column6) FROM testTable";
    BrokerResponseNative brokerResponse = getBrokerResponseForQuery(query);
    QueriesTestUtils.verifyAggregationResult(brokerResponse, 400000L, 0L, 400000L, 400000L, new String[] { "2147483647" });
    brokerResponse = getBrokerResponseForQueryWithFilter(query);
    QueriesTestUtils.verifyAggregationResult(brokerResponse, 62480L, 1129720L, 62480L, 400000L, new String[] { "2147483647" });
    brokerResponse = getBrokerResponseForQuery(query + SV_GROUP_BY);
    QueriesTestUtils.verifyAggregationResult(brokerResponse, 400000L, 0L, 800000L, 400000L, new String[] { "2147483647" });
    brokerResponse = getBrokerResponseForQuery(query + MV_GROUP_BY);
    QueriesTestUtils.verifyAggregationResult(brokerResponse, 400000L, 0L, 800000L, 400000L, new String[] { "2147483647" });
}
Also used : BrokerResponseNative(com.linkedin.pinot.common.response.broker.BrokerResponseNative) Test(org.testng.annotations.Test)

Example 10 with BrokerResponseNative

use of com.linkedin.pinot.common.response.broker.BrokerResponseNative in project pinot by linkedin.

the class InterSegmentAggregationMultiValueQueriesTest method testMinMaxRangeMV.

@Test
public void testMinMaxRangeMV() {
    String query = "SELECT MINMAXRANGEMV(column6) FROM testTable";
    BrokerResponseNative brokerResponse = getBrokerResponseForQuery(query);
    QueriesTestUtils.verifyAggregationResult(brokerResponse, 400000L, 0L, 400000L, 400000L, new String[] { "2147482646.00000" });
    brokerResponse = getBrokerResponseForQueryWithFilter(query);
    QueriesTestUtils.verifyAggregationResult(brokerResponse, 62480L, 1129720L, 62480L, 400000L, new String[] { "2147482638.00000" });
    brokerResponse = getBrokerResponseForQuery(query + SV_GROUP_BY);
    QueriesTestUtils.verifyAggregationResult(brokerResponse, 400000L, 0L, 800000L, 400000L, new String[] { "2147482646.00000" });
    brokerResponse = getBrokerResponseForQuery(query + MV_GROUP_BY);
    QueriesTestUtils.verifyAggregationResult(brokerResponse, 400000L, 0L, 800000L, 400000L, new String[] { "2147482646.00000" });
}
Also used : BrokerResponseNative(com.linkedin.pinot.common.response.broker.BrokerResponseNative) Test(org.testng.annotations.Test)

Aggregations

BrokerResponseNative (com.linkedin.pinot.common.response.broker.BrokerResponseNative)58 Test (org.testng.annotations.Test)56 ServerInstance (com.linkedin.pinot.common.response.ServerInstance)23 DataTable (com.linkedin.pinot.common.utils.DataTable)23 HashMap (java.util.HashMap)23 QueryRequest (com.linkedin.pinot.common.query.QueryRequest)22 BrokerRequest (com.linkedin.pinot.common.request.BrokerRequest)22 InstanceRequest (com.linkedin.pinot.common.request.InstanceRequest)22 QuerySource (com.linkedin.pinot.common.request.QuerySource)8 IndexSegment (com.linkedin.pinot.core.indexsegment.IndexSegment)8 AggregationResult (com.linkedin.pinot.common.response.broker.AggregationResult)6 RealtimeSegmentImplTest (com.linkedin.pinot.core.realtime.impl.kafka.RealtimeSegmentImplTest)3 TestGroupByAggreationQuery (com.linkedin.pinot.common.query.gen.AvroQueryGenerator.TestGroupByAggreationQuery)2 TestSimpleAggreationQuery (com.linkedin.pinot.common.query.gen.AvroQueryGenerator.TestSimpleAggreationQuery)2 QueryProcessingException (com.linkedin.pinot.common.response.broker.QueryProcessingException)2 JSONArray (org.json.JSONArray)2 SelectionResults (com.linkedin.pinot.common.response.broker.SelectionResults)1 DataSchema (com.linkedin.pinot.common.utils.DataSchema)1 AggregationFunction (com.linkedin.pinot.core.query.aggregation.function.AggregationFunction)1 Serializable (java.io.Serializable)1