Search in sources :

Example 11 with SearchResultValue

use of io.druid.query.search.SearchResultValue in project druid by druid-io.

the class AppendTest method testSearchWithOverlap.

@Test
public void testSearchWithOverlap() {
    List<Result<SearchResultValue>> expectedResults = Arrays.asList(new Result<SearchResultValue>(new DateTime("2011-01-12T00:00:00.000Z"), new SearchResultValue(Arrays.<SearchHit>asList(new SearchHit(placementishDimension, "a"), new SearchHit(placementDimension, "mezzanine"), new SearchHit(marketDimension, "total_market")))));
    SearchQuery query = makeSearchQuery();
    QueryRunner runner = TestQueryRunners.makeSearchQueryRunner(segment2);
    HashMap<String, Object> context = new HashMap<String, Object>();
    TestHelper.assertExpectedResults(expectedResults, runner.run(query, context));
}
Also used : SearchResultValue(io.druid.query.search.SearchResultValue) SearchQuery(io.druid.query.search.search.SearchQuery) SearchHit(io.druid.query.search.search.SearchHit) HashMap(java.util.HashMap) DateTime(org.joda.time.DateTime) QueryRunner(io.druid.query.QueryRunner) Result(io.druid.query.Result) Test(org.junit.Test)

Aggregations

Result (io.druid.query.Result)11 SearchResultValue (io.druid.query.search.SearchResultValue)11 SearchQuery (io.druid.query.search.search.SearchQuery)9 HashMap (java.util.HashMap)9 QueryRunner (io.druid.query.QueryRunner)7 SearchHit (io.druid.query.search.search.SearchHit)7 DateTime (org.joda.time.DateTime)6 Test (org.junit.Test)5 ImmutableMap (com.google.common.collect.ImmutableMap)2 FinalizeResultsQueryRunner (io.druid.query.FinalizeResultsQueryRunner)2 LinkedHashMap (java.util.LinkedHashMap)2 Map (java.util.Map)2 Interval (org.joda.time.Interval)2 Function (com.google.common.base.Function)1 ImmutableList (com.google.common.collect.ImmutableList)1 HashFunction (com.google.common.hash.HashFunction)1 QueryableDruidServer (io.druid.client.selector.QueryableDruidServer)1 ISE (io.druid.java.util.common.ISE)1 Pair (io.druid.java.util.common.Pair)1 FunctionalIterable (io.druid.java.util.common.guava.FunctionalIterable)1