diff --git a/histogram/src/test/java/io/druid/query/aggregation/histogram/ApproximateHistogramGroupByQueryTest.java b/histogram/src/test/java/io/druid/query/aggregation/histogram/ApproximateHistogramGroupByQueryTest.java index d623b9b6649..1c7b23b3a3f 100644 --- a/histogram/src/test/java/io/druid/query/aggregation/histogram/ApproximateHistogramGroupByQueryTest.java +++ b/histogram/src/test/java/io/druid/query/aggregation/histogram/ApproximateHistogramGroupByQueryTest.java @@ -157,8 +157,8 @@ public class ApproximateHistogramGroupByQueryTest .setDimensions( Arrays.asList( new DefaultDimensionSpec( - QueryRunnerTestHelper.providerDimension, - "proViderAlias" + QueryRunnerTestHelper.marketDimension, + "marKetAlias" ) ) ) @@ -167,7 +167,7 @@ public class ApproximateHistogramGroupByQueryTest new DefaultLimitSpec( Lists.newArrayList( new OrderByColumnSpec( - "proViderAlias", + "marKetAlias", OrderByColumnSpec.Direction.DESCENDING ) ), 1 @@ -189,7 +189,7 @@ public class ApproximateHistogramGroupByQueryTest List expectedResults = Arrays.asList( GroupByQueryRunnerTestHelper.createExpectedRow( "1970-01-01T00:00:00.000Z", - "provideralias", "upfront", + "marketalias", "upfront", "rows", 186L, "quantile", 880.9881f, "apphisto", diff --git a/histogram/src/test/java/io/druid/query/aggregation/histogram/ApproximateHistogramTopNQueryTest.java b/histogram/src/test/java/io/druid/query/aggregation/histogram/ApproximateHistogramTopNQueryTest.java index e362b4ad9b2..25f58c064bf 100644 --- a/histogram/src/test/java/io/druid/query/aggregation/histogram/ApproximateHistogramTopNQueryTest.java +++ b/histogram/src/test/java/io/druid/query/aggregation/histogram/ApproximateHistogramTopNQueryTest.java @@ -113,7 +113,7 @@ public class ApproximateHistogramTopNQueryTest TopNQuery query = new TopNQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.allGran) - .dimension(QueryRunnerTestHelper.providerDimension) + .dimension(QueryRunnerTestHelper.marketDimension) .metric(QueryRunnerTestHelper.dependentPostAggMetric) .threshold(4) .intervals(QueryRunnerTestHelper.fullOnInterval) @@ -144,7 +144,7 @@ public class ApproximateHistogramTopNQueryTest new TopNResultValue( Arrays.>asList( ImmutableMap.builder() - .put(QueryRunnerTestHelper.providerDimension, "total_market") + .put(QueryRunnerTestHelper.marketDimension, "total_market") .put("rows", 186L) .put("index", 215679.82879638672D) .put("addRowsIndexConstant", 215866.82879638672D) @@ -175,7 +175,7 @@ public class ApproximateHistogramTopNQueryTest ) .build(), ImmutableMap.builder() - .put(QueryRunnerTestHelper.providerDimension, "upfront") + .put(QueryRunnerTestHelper.marketDimension, "upfront") .put("rows", 186L) .put("index", 192046.1060180664D) .put("addRowsIndexConstant", 192233.1060180664D) @@ -206,7 +206,7 @@ public class ApproximateHistogramTopNQueryTest ) .build(), ImmutableMap.builder() - .put(QueryRunnerTestHelper.providerDimension, "spot") + .put(QueryRunnerTestHelper.marketDimension, "spot") .put("rows", 837L) .put("index", 95606.57232284546D) .put("addRowsIndexConstant", 96444.57232284546D) diff --git a/pom.xml b/pom.xml index 8c1202d7b79..0c6a4b34aa8 100644 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,7 @@ scm:git:ssh://git@github.com/metamx/druid.git scm:git:ssh://git@github.com/metamx/druid.git http://www.github.com/metamx/druid - druid-0.6.131-SNAPSHOT + druid-0.6.159-SNAPSHOT @@ -41,7 +41,7 @@ UTF-8 0.26.9 2.6.0 - 0.2.14 + 0.2.15 diff --git a/processing/src/test/java/io/druid/data/input/ProtoBufInputRowParserTest.java b/processing/src/test/java/io/druid/data/input/ProtoBufInputRowParserTest.java index 67d5fdc3574..9a099e79366 100644 --- a/processing/src/test/java/io/druid/data/input/ProtoBufInputRowParserTest.java +++ b/processing/src/test/java/io/druid/data/input/ProtoBufInputRowParserTest.java @@ -85,6 +85,7 @@ public class ProtoBufInputRowParserTest InputRow row = parser.parse(ByteBuffer.wrap(out.toByteArray())); System.out.println(row); + Arrays.sort(DIMENSIONS); assertEquals(Arrays.asList(DIMENSIONS), row.getDimensions()); assertEquals(dateTime.getMillis(), row.getTimestampFromEpoch()); diff --git a/processing/src/test/java/io/druid/query/QueryRunnerTestHelper.java b/processing/src/test/java/io/druid/query/QueryRunnerTestHelper.java index deeaff563e8..bb0556f4757 100644 --- a/processing/src/test/java/io/druid/query/QueryRunnerTestHelper.java +++ b/processing/src/test/java/io/druid/query/QueryRunnerTestHelper.java @@ -82,7 +82,7 @@ public class QueryRunnerTestHelper ); public static final QueryGranularity dayGran = QueryGranularity.DAY; public static final QueryGranularity allGran = QueryGranularity.ALL; - public static final String providerDimension = "proVider"; + public static final String marketDimension = "marKet"; public static final String qualityDimension = "quality"; public static final String placementDimension = "placement"; public static final String placementishDimension = "placementish"; diff --git a/processing/src/test/java/io/druid/query/groupby/GroupByQueryRunnerTest.java b/processing/src/test/java/io/druid/query/groupby/GroupByQueryRunnerTest.java index 1456df7fcb9..772d3b0d18d 100644 --- a/processing/src/test/java/io/druid/query/groupby/GroupByQueryRunnerTest.java +++ b/processing/src/test/java/io/druid/query/groupby/GroupByQueryRunnerTest.java @@ -742,8 +742,8 @@ public class GroupByQueryRunnerTest .setDimensions( Arrays.asList( new DefaultDimensionSpec( - QueryRunnerTestHelper.providerDimension, - "ProviderAlias" + QueryRunnerTestHelper.marketDimension, + "MarketAlias" ) ) ) @@ -752,7 +752,7 @@ public class GroupByQueryRunnerTest new DefaultLimitSpec( Lists.newArrayList( new OrderByColumnSpec( - "providerALIAS", + "marketALIAS", OrderByColumnSpec.Direction.DESCENDING ) ), 3 @@ -766,9 +766,9 @@ public class GroupByQueryRunnerTest .build(); List expectedResults = Arrays.asList( - GroupByQueryRunnerTestHelper.createExpectedRow("1970-01-01T00:00:00.000Z", "provideralias", "upfront", "rows", 186L), - GroupByQueryRunnerTestHelper.createExpectedRow("1970-01-01T00:00:00.000Z", "provideralias", "total_market", "rows", 186L), - GroupByQueryRunnerTestHelper.createExpectedRow("1970-01-01T00:00:00.000Z", "provideralias", "spot", "rows", 837L) + GroupByQueryRunnerTestHelper.createExpectedRow("1970-01-01T00:00:00.000Z", "marketalias", "upfront", "rows", 186L), + GroupByQueryRunnerTestHelper.createExpectedRow("1970-01-01T00:00:00.000Z", "marketalias", "total_market", "rows", 186L), + GroupByQueryRunnerTestHelper.createExpectedRow("1970-01-01T00:00:00.000Z", "marketalias", "spot", "rows", 837L) ); Iterable results = GroupByQueryRunnerTestHelper.runQuery(factory, runner, query); @@ -1333,14 +1333,14 @@ public class GroupByQueryRunnerTest .setDataSource(QueryRunnerTestHelper.dataSource) .setQuerySegmentSpec(QueryRunnerTestHelper.firstToThird) .setDimensions(Lists.newArrayList(new DefaultDimensionSpec("quality", "alias"))) - .setDimFilter(new JavaScriptDimFilter("provider", "function(dim){ return true; }")) + .setDimFilter(new JavaScriptDimFilter("market", "function(dim){ return true; }")) .setAggregatorSpecs( Arrays.asList( QueryRunnerTestHelper.rowsCount, new DoubleSumAggregatorFactory("idx_subagg", "index"), new JavaScriptAggregatorFactory( "js_agg", - Arrays.asList("index", "provider"), + Arrays.asList("index", "market"), "function(current, index, dim){return current + index + dim.length;}", "function(){return 0;}", "function(a,b){return a + b;}" diff --git a/processing/src/test/java/io/druid/query/search/SearchQueryRunnerTest.java b/processing/src/test/java/io/druid/query/search/SearchQueryRunnerTest.java index e5abe9b5d7f..ee833db7385 100644 --- a/processing/src/test/java/io/druid/query/search/SearchQueryRunnerTest.java +++ b/processing/src/test/java/io/druid/query/search/SearchQueryRunnerTest.java @@ -87,7 +87,7 @@ public class SearchQueryRunnerTest QueryRunnerTestHelper.qualityDimension, Sets.newHashSet("automotive", "mezzanine", "travel", "health", "entertainment") ); - expectedResults.put(QueryRunnerTestHelper.providerDimension.toLowerCase(), Sets.newHashSet("total_market")); + expectedResults.put(QueryRunnerTestHelper.marketDimension.toLowerCase(), Sets.newHashSet("total_market")); expectedResults.put(QueryRunnerTestHelper.placementishDimension, Sets.newHashSet("a")); checkSearchQuery(searchQuery, expectedResults); @@ -137,13 +137,13 @@ public class SearchQueryRunnerTest public void testSearchWithDimensionProvider() { Map> expectedResults = Maps.newTreeMap(String.CASE_INSENSITIVE_ORDER); - expectedResults.put(QueryRunnerTestHelper.providerDimension, new HashSet(Arrays.asList("total_market"))); + expectedResults.put(QueryRunnerTestHelper.marketDimension, new HashSet(Arrays.asList("total_market"))); checkSearchQuery( Druids.newSearchQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.allGran) - .dimensions("provider") + .dimensions("market") .intervals(QueryRunnerTestHelper.fullOnInterval) .query("a") .build(), @@ -163,7 +163,7 @@ public class SearchQueryRunnerTest "automotive", "mezzanine", "travel", "health", "entertainment" ) ), - QueryRunnerTestHelper.providerDimension, + QueryRunnerTestHelper.marketDimension, new HashSet( Arrays.asList("total_market") ) @@ -177,7 +177,7 @@ public class SearchQueryRunnerTest .dimensions( Arrays.asList( QueryRunnerTestHelper.qualityDimension, - QueryRunnerTestHelper.providerDimension + QueryRunnerTestHelper.marketDimension ) ) .intervals(QueryRunnerTestHelper.fullOnInterval) @@ -191,7 +191,7 @@ public class SearchQueryRunnerTest public void testSearchWithDimensionsPlacementAndProvider() { Map> expectedResults = Maps.newTreeMap(String.CASE_INSENSITIVE_ORDER); - expectedResults.put(QueryRunnerTestHelper.providerDimension, new HashSet(Arrays.asList("total_market"))); + expectedResults.put(QueryRunnerTestHelper.marketDimension, new HashSet(Arrays.asList("total_market"))); checkSearchQuery( Druids.newSearchQueryBuilder() @@ -200,7 +200,7 @@ public class SearchQueryRunnerTest .dimensions( Arrays.asList( QueryRunnerTestHelper.placementishDimension, - QueryRunnerTestHelper.providerDimension + QueryRunnerTestHelper.marketDimension ) ) .intervals(QueryRunnerTestHelper.fullOnInterval) @@ -235,15 +235,15 @@ public class SearchQueryRunnerTest public void testSearchWithSingleFilter2() { Map> expectedResults = Maps.newTreeMap(String.CASE_INSENSITIVE_ORDER); - expectedResults.put(QueryRunnerTestHelper.providerDimension, new HashSet(Arrays.asList("total_market"))); + expectedResults.put(QueryRunnerTestHelper.marketDimension, new HashSet(Arrays.asList("total_market"))); checkSearchQuery( Druids.newSearchQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.allGran) - .filters(QueryRunnerTestHelper.providerDimension, "total_market") + .filters(QueryRunnerTestHelper.marketDimension, "total_market") .intervals(QueryRunnerTestHelper.fullOnInterval) - .dimensions(QueryRunnerTestHelper.providerDimension) + .dimensions(QueryRunnerTestHelper.marketDimension) .query("a") .build(), expectedResults @@ -260,7 +260,7 @@ public class SearchQueryRunnerTest .fields( Arrays.asList( Druids.newSelectorDimFilterBuilder() - .dimension(QueryRunnerTestHelper.providerDimension) + .dimension(QueryRunnerTestHelper.marketDimension) .value("spot") .build(), Druids.newSelectorDimFilterBuilder() @@ -343,7 +343,7 @@ public class SearchQueryRunnerTest .fields( Arrays.asList( Druids.newSelectorDimFilterBuilder() - .dimension(QueryRunnerTestHelper.providerDimension) + .dimension(QueryRunnerTestHelper.marketDimension) .value("total_market") .build(), Druids.newSelectorDimFilterBuilder() diff --git a/processing/src/test/java/io/druid/query/select/SelectQueryRunnerTest.java b/processing/src/test/java/io/druid/query/select/SelectQueryRunnerTest.java index b60683c6d38..e4779fb3df5 100644 --- a/processing/src/test/java/io/druid/query/select/SelectQueryRunnerTest.java +++ b/processing/src/test/java/io/druid/query/select/SelectQueryRunnerTest.java @@ -65,7 +65,7 @@ public class SelectQueryRunnerTest ); } - private static final String providerLowercase = "provider"; + private static final String providerLowercase = "market"; private final QueryRunner runner; @@ -271,7 +271,7 @@ public class SelectQueryRunnerTest SelectQuery query = new SelectQuery( new TableDataSource(QueryRunnerTestHelper.dataSource), new LegacySegmentSpec(new Interval("2011-01-12/2011-01-14")), - new SelectorDimFilter(QueryRunnerTestHelper.providerDimension, "spot"), + new SelectorDimFilter(QueryRunnerTestHelper.marketDimension, "spot"), QueryRunnerTestHelper.dayGran, Lists.newArrayList(QueryRunnerTestHelper.qualityDimension), Lists.newArrayList(QueryRunnerTestHelper.indexMetric), @@ -368,8 +368,8 @@ public class SelectQueryRunnerTest new LegacySegmentSpec(new Interval("2011-01-12/2011-01-14")), new AndDimFilter( Arrays.asList( - new SelectorDimFilter(QueryRunnerTestHelper.providerDimension, "spot"), - new SelectorDimFilter(QueryRunnerTestHelper.providerDimension, "foo") + new SelectorDimFilter(QueryRunnerTestHelper.marketDimension, "spot"), + new SelectorDimFilter(QueryRunnerTestHelper.marketDimension, "foo") ) ), QueryRunnerTestHelper.allGran, diff --git a/processing/src/test/java/io/druid/query/timeseries/TimeseriesQueryRunnerTest.java b/processing/src/test/java/io/druid/query/timeseries/TimeseriesQueryRunnerTest.java index c2e3889cd38..d4110c7b266 100644 --- a/processing/src/test/java/io/druid/query/timeseries/TimeseriesQueryRunnerTest.java +++ b/processing/src/test/java/io/druid/query/timeseries/TimeseriesQueryRunnerTest.java @@ -87,7 +87,7 @@ public class TimeseriesQueryRunnerTest QueryGranularity gran = QueryGranularity.DAY; TimeseriesQuery query = Druids.newTimeseriesQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) - .granularity(QueryRunnerTestHelper.dayGran) + .granularity(gran) .intervals(QueryRunnerTestHelper.fullOnInterval) .aggregators( Arrays.asList( @@ -193,7 +193,7 @@ public class TimeseriesQueryRunnerTest TimeseriesQuery query = Druids.newTimeseriesQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.dayGran) - .filters(QueryRunnerTestHelper.providerDimension, "upfront") + .filters(QueryRunnerTestHelper.marketDimension, "upfront") .intervals(QueryRunnerTestHelper.fullOnInterval) .aggregators( Arrays.asList( @@ -205,7 +205,7 @@ public class TimeseriesQueryRunnerTest Assert.assertEquals( Druids.newSelectorDimFilterBuilder() - .dimension(QueryRunnerTestHelper.providerDimension) + .dimension(QueryRunnerTestHelper.marketDimension) .value("upfront") .build(), query.getDimensionsFilter() @@ -418,7 +418,7 @@ public class TimeseriesQueryRunnerTest { TimeseriesQuery query1 = Druids.newTimeseriesQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) - .filters(QueryRunnerTestHelper.providerDimension, "spot", "upfront", "total_market") + .filters(QueryRunnerTestHelper.marketDimension, "spot", "upfront", "total_market") .granularity( new PeriodGranularity( new Period("P7D"), @@ -471,7 +471,7 @@ public class TimeseriesQueryRunnerTest { TimeseriesQuery query1 = Druids.newTimeseriesQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) - .filters(QueryRunnerTestHelper.providerDimension, "spot", "upfront", "total_market") + .filters(QueryRunnerTestHelper.marketDimension, "spot", "upfront", "total_market") .granularity(QueryGranularity.HOUR) .intervals( Arrays.asList( @@ -539,7 +539,7 @@ public class TimeseriesQueryRunnerTest { TimeseriesQuery query1 = Druids.newTimeseriesQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) - .filters(QueryRunnerTestHelper.providerDimension, "spot", "upfront", "total_market") + .filters(QueryRunnerTestHelper.marketDimension, "spot", "upfront", "total_market") .granularity( new PeriodGranularity( new Period("PT1H"), @@ -586,7 +586,7 @@ public class TimeseriesQueryRunnerTest { TimeseriesQuery query1 = Druids.newTimeseriesQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) - .filters(QueryRunnerTestHelper.providerDimension, "spot", "upfront", "total_market") + .filters(QueryRunnerTestHelper.marketDimension, "spot", "upfront", "total_market") .granularity(new PeriodGranularity(new Period("P1M"), null, null)) .intervals( Arrays.asList( @@ -624,7 +624,7 @@ public class TimeseriesQueryRunnerTest TimeseriesQuery query2 = Druids.newTimeseriesQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) - .filters(QueryRunnerTestHelper.providerDimension, "spot", "upfront", "total_market") + .filters(QueryRunnerTestHelper.marketDimension, "spot", "upfront", "total_market") .granularity("DAY") .intervals( Arrays.asList( @@ -702,7 +702,7 @@ public class TimeseriesQueryRunnerTest TimeseriesQuery query = Druids.newTimeseriesQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.dayGran) - .filters(QueryRunnerTestHelper.providerDimension, "spot", "upfront", "total_market") + .filters(QueryRunnerTestHelper.marketDimension, "spot", "upfront", "total_market") .intervals(QueryRunnerTestHelper.firstToThird) .aggregators( Arrays.asList( @@ -752,7 +752,7 @@ public class TimeseriesQueryRunnerTest TimeseriesQuery query = Druids.newTimeseriesQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.dayGran) - .filters(new RegexDimFilter(QueryRunnerTestHelper.providerDimension, "^.p.*$")) // spot and upfront + .filters(new RegexDimFilter(QueryRunnerTestHelper.marketDimension, "^.p.*$")) // spot and upfront .intervals(QueryRunnerTestHelper.firstToThird) .aggregators( Arrays.asList( @@ -802,7 +802,7 @@ public class TimeseriesQueryRunnerTest TimeseriesQuery query = Druids.newTimeseriesQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.dayGran) - .filters(QueryRunnerTestHelper.providerDimension, "spot") + .filters(QueryRunnerTestHelper.marketDimension, "spot") .intervals(QueryRunnerTestHelper.firstToThird) .aggregators( Arrays.asList( @@ -852,7 +852,7 @@ public class TimeseriesQueryRunnerTest TimeseriesQuery query = Druids.newTimeseriesQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.dayGran) - .filters(QueryRunnerTestHelper.providerDimension, "upfront") + .filters(QueryRunnerTestHelper.marketDimension, "upfront") .intervals(QueryRunnerTestHelper.firstToThird) .aggregators( Arrays.asList( @@ -902,7 +902,7 @@ public class TimeseriesQueryRunnerTest TimeseriesQuery query = Druids.newTimeseriesQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.dayGran) - .filters(QueryRunnerTestHelper.providerDimension, "total_market") + .filters(QueryRunnerTestHelper.marketDimension, "total_market") .intervals(QueryRunnerTestHelper.firstToThird) .aggregators( Arrays.asList( @@ -954,7 +954,7 @@ public class TimeseriesQueryRunnerTest .fields( Arrays.asList( Druids.newSelectorDimFilterBuilder() - .dimension(QueryRunnerTestHelper.providerDimension) + .dimension(QueryRunnerTestHelper.marketDimension) .value("spot") .build(), Druids.newOrDimFilterBuilder() @@ -1011,7 +1011,7 @@ public class TimeseriesQueryRunnerTest .fields( Arrays.asList( Druids.newSelectorDimFilterBuilder() - .dimension(QueryRunnerTestHelper.providerDimension) + .dimension(QueryRunnerTestHelper.marketDimension) .value("spot") .build(), Druids.newSelectorDimFilterBuilder() @@ -1069,7 +1069,7 @@ public class TimeseriesQueryRunnerTest .fields( Arrays.asList( Druids.newSelectorDimFilterBuilder() - .dimension(QueryRunnerTestHelper.providerDimension) + .dimension(QueryRunnerTestHelper.marketDimension) .value("spot") .build(), Druids.newSelectorDimFilterBuilder() @@ -1127,7 +1127,7 @@ public class TimeseriesQueryRunnerTest .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.dayGran) .filters( - QueryRunnerTestHelper.providerDimension, + QueryRunnerTestHelper.marketDimension, "spot", "upfront", "total_market", @@ -1183,7 +1183,7 @@ public class TimeseriesQueryRunnerTest .fields( Arrays.asList( Druids.newSelectorDimFilterBuilder() - .dimension(QueryRunnerTestHelper.providerDimension) + .dimension(QueryRunnerTestHelper.marketDimension) .value("spot") .build(), Druids.newOrDimFilterBuilder() @@ -1288,7 +1288,7 @@ public class TimeseriesQueryRunnerTest TimeseriesQuery query = Druids.newTimeseriesQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.dayGran) - .filters(QueryRunnerTestHelper.providerDimension, "billy") + .filters(QueryRunnerTestHelper.marketDimension, "billy") .intervals(QueryRunnerTestHelper.firstToThird) .aggregators(QueryRunnerTestHelper.commonAggregators) .postAggregators(Arrays.asList(QueryRunnerTestHelper.addRowsIndexConstant)) @@ -1333,7 +1333,7 @@ public class TimeseriesQueryRunnerTest .fields( Arrays.asList( Druids.newSelectorDimFilterBuilder() - .dimension(QueryRunnerTestHelper.providerDimension) + .dimension(QueryRunnerTestHelper.marketDimension) .value("billy") .build(), Druids.newSelectorDimFilterBuilder() @@ -1533,7 +1533,7 @@ public class TimeseriesQueryRunnerTest .fields( Arrays.asList( Druids.newSelectorDimFilterBuilder() - .dimension(QueryRunnerTestHelper.providerDimension) + .dimension(QueryRunnerTestHelper.marketDimension) .value("spot") .build(), Druids.newSelectorDimFilterBuilder() @@ -1556,7 +1556,7 @@ public class TimeseriesQueryRunnerTest .fields( Arrays.asList( Druids.newSelectorDimFilterBuilder() - .dimension(QueryRunnerTestHelper.providerDimension) + .dimension(QueryRunnerTestHelper.marketDimension) .value("spot") .build(), Druids.newSelectorDimFilterBuilder() @@ -1594,7 +1594,7 @@ public class TimeseriesQueryRunnerTest .fields( Arrays.asList( Druids.newSelectorDimFilterBuilder() - .dimension(QueryRunnerTestHelper.providerDimension) + .dimension(QueryRunnerTestHelper.marketDimension) .value("spot") .build(), Druids.newOrDimFilterBuilder() @@ -1616,7 +1616,7 @@ public class TimeseriesQueryRunnerTest .fields( Arrays.asList( Druids.newSelectorDimFilterBuilder() - .dimension(QueryRunnerTestHelper.providerDimension) + .dimension(QueryRunnerTestHelper.marketDimension) .value("spot") .build(), Druids.newOrDimFilterBuilder() diff --git a/processing/src/test/java/io/druid/query/topn/TopNQueryRunnerTest.java b/processing/src/test/java/io/druid/query/topn/TopNQueryRunnerTest.java index 09d383168cf..d155c35f91a 100644 --- a/processing/src/test/java/io/druid/query/topn/TopNQueryRunnerTest.java +++ b/processing/src/test/java/io/druid/query/topn/TopNQueryRunnerTest.java @@ -104,7 +104,7 @@ public class TopNQueryRunnerTest this.runner = runner; } - private static final String providerDimension = "provider"; + private static final String marketDimension = "market"; @Test public void testFullOnTopN() @@ -112,7 +112,7 @@ public class TopNQueryRunnerTest TopNQuery query = new TopNQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.allGran) - .dimension(providerDimension) + .dimension(marketDimension) .metric(QueryRunnerTestHelper.indexMetric) .threshold(4) .intervals(QueryRunnerTestHelper.fullOnInterval) @@ -136,7 +136,7 @@ public class TopNQueryRunnerTest new TopNResultValue( Arrays.>asList( ImmutableMap.builder() - .put(providerDimension, "total_market") + .put(marketDimension, "total_market") .put("rows", 186L) .put("index", 215679.82879638672D) .put("addRowsIndexConstant", 215866.82879638672D) @@ -145,7 +145,7 @@ public class TopNQueryRunnerTest .put("minIndex", 792.3260498046875D) .build(), ImmutableMap.builder() - .put(providerDimension, "upfront") + .put(marketDimension, "upfront") .put("rows", 186L) .put("index", 192046.1060180664D) .put("addRowsIndexConstant", 192233.1060180664D) @@ -154,7 +154,7 @@ public class TopNQueryRunnerTest .put("minIndex", 545.9906005859375D) .build(), ImmutableMap.builder() - .put(providerDimension, "spot") + .put(marketDimension, "spot") .put("rows", 837L) .put("index", 95606.57232284546D) .put("addRowsIndexConstant", 96444.57232284546D) @@ -176,7 +176,7 @@ public class TopNQueryRunnerTest TopNQuery query = new TopNQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.allGran) - .dimension(providerDimension) + .dimension(marketDimension) .metric(QueryRunnerTestHelper.addRowsIndexConstantMetric) .threshold(4) .intervals(QueryRunnerTestHelper.fullOnInterval) @@ -200,7 +200,7 @@ public class TopNQueryRunnerTest new TopNResultValue( Arrays.>asList( ImmutableMap.builder() - .put(providerDimension, "total_market") + .put(marketDimension, "total_market") .put("rows", 186L) .put("index", 215679.82879638672D) .put("addRowsIndexConstant", 215866.82879638672D) @@ -209,7 +209,7 @@ public class TopNQueryRunnerTest .put("minIndex", 792.3260498046875D) .build(), ImmutableMap.builder() - .put(providerDimension, "upfront") + .put(marketDimension, "upfront") .put("rows", 186L) .put("index", 192046.1060180664D) .put("addRowsIndexConstant", 192233.1060180664D) @@ -218,7 +218,7 @@ public class TopNQueryRunnerTest .put("minIndex", 545.9906005859375D) .build(), ImmutableMap.builder() - .put(providerDimension, "spot") + .put(marketDimension, "spot") .put("rows", 837L) .put("index", 95606.57232284546D) .put("addRowsIndexConstant", 96444.57232284546D) @@ -241,7 +241,7 @@ public class TopNQueryRunnerTest TopNQuery query = new TopNQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.allGran) - .dimension(providerDimension) + .dimension(marketDimension) .metric(QueryRunnerTestHelper.uniqueMetric) .threshold(3) .intervals(QueryRunnerTestHelper.fullOnInterval) @@ -265,7 +265,7 @@ public class TopNQueryRunnerTest new TopNResultValue( Arrays.>asList( ImmutableMap.builder() - .put("provider", "spot") + .put("market", "spot") .put("rows", 837L) .put("index", 95606.57232284546D) .put("addRowsIndexConstant", 96444.57232284546D) @@ -274,7 +274,7 @@ public class TopNQueryRunnerTest .put("minIndex", 59.02102279663086D) .build(), ImmutableMap.builder() - .put("provider", "total_market") + .put("market", "total_market") .put("rows", 186L) .put("index", 215679.82879638672D) .put("addRowsIndexConstant", 215866.82879638672D) @@ -283,7 +283,7 @@ public class TopNQueryRunnerTest .put("minIndex", 792.3260498046875D) .build(), ImmutableMap.builder() - .put("provider", "upfront") + .put("market", "upfront") .put("rows", 186L) .put("index", 192046.1060180664D) .put("addRowsIndexConstant", 192233.1060180664D) @@ -306,7 +306,7 @@ public class TopNQueryRunnerTest TopNQuery query = new TopNQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.allGran) - .dimension(providerDimension) + .dimension(marketDimension) .metric(QueryRunnerTestHelper.indexMetric) .threshold(4) .intervals(QueryRunnerTestHelper.firstToThird) @@ -321,21 +321,21 @@ public class TopNQueryRunnerTest new TopNResultValue( Arrays.>asList( ImmutableMap.of( - providerDimension, "total_market", + marketDimension, "total_market", "rows", 4L, "index", 5351.814697265625D, "addRowsIndexConstant", 5356.814697265625D, "uniques", QueryRunnerTestHelper.UNIQUES_2 ), ImmutableMap.of( - providerDimension, "upfront", + marketDimension, "upfront", "rows", 4L, "index", 4875.669677734375D, "addRowsIndexConstant", 4880.669677734375D, "uniques", QueryRunnerTestHelper.UNIQUES_2 ), ImmutableMap.of( - providerDimension, "spot", + marketDimension, "spot", "rows", 18L, "index", 2231.8768157958984D, "addRowsIndexConstant", 2250.8768157958984D, @@ -355,7 +355,7 @@ public class TopNQueryRunnerTest TopNQuery query = new TopNQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.allGran) - .dimension(providerDimension) + .dimension(marketDimension) .metric(new NumericTopNMetricSpec("uniques")) .threshold(4) .intervals(QueryRunnerTestHelper.firstToThird) @@ -370,21 +370,21 @@ public class TopNQueryRunnerTest new TopNResultValue( Arrays.>asList( ImmutableMap.of( - "provider", "spot", + "market", "spot", "rows", 18L, "index", 2231.8768157958984D, "addRowsIndexConstant", 2250.8768157958984D, "uniques", QueryRunnerTestHelper.UNIQUES_9 ), ImmutableMap.of( - "provider", "total_market", + "market", "total_market", "rows", 4L, "index", 5351.814697265625D, "addRowsIndexConstant", 5356.814697265625D, "uniques", QueryRunnerTestHelper.UNIQUES_2 ), ImmutableMap.of( - "provider", "upfront", + "market", "upfront", "rows", 4L, "index", 4875.669677734375D, "addRowsIndexConstant", 4880.669677734375D, @@ -404,8 +404,8 @@ public class TopNQueryRunnerTest TopNQuery query = new TopNQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.allGran) - .filters(providerDimension, "total_market", "upfront", "spot") - .dimension(providerDimension) + .filters(marketDimension, "total_market", "upfront", "spot") + .dimension(marketDimension) .metric(QueryRunnerTestHelper.indexMetric) .threshold(4) .intervals(QueryRunnerTestHelper.firstToThird) @@ -419,21 +419,21 @@ public class TopNQueryRunnerTest new TopNResultValue( Arrays.>asList( ImmutableMap.of( - providerDimension, "total_market", + marketDimension, "total_market", "rows", 4L, "index", 5351.814697265625D, "addRowsIndexConstant", 5356.814697265625D, "uniques", QueryRunnerTestHelper.UNIQUES_2 ), ImmutableMap.of( - providerDimension, "upfront", + marketDimension, "upfront", "rows", 4L, "index", 4875.669677734375D, "addRowsIndexConstant", 4880.669677734375D, "uniques", QueryRunnerTestHelper.UNIQUES_2 ), ImmutableMap.of( - providerDimension, "spot", + marketDimension, "spot", "rows", 18L, "index", 2231.8768157958984D, "addRowsIndexConstant", 2250.8768157958984D, @@ -453,8 +453,8 @@ public class TopNQueryRunnerTest TopNQuery query = new TopNQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.allGran) - .filters(providerDimension, "total_market", "upfront") - .dimension(providerDimension) + .filters(marketDimension, "total_market", "upfront") + .dimension(marketDimension) .metric(QueryRunnerTestHelper.indexMetric) .threshold(4) .intervals(QueryRunnerTestHelper.firstToThird) @@ -468,14 +468,14 @@ public class TopNQueryRunnerTest new TopNResultValue( Arrays.>asList( ImmutableMap.of( - providerDimension, "total_market", + marketDimension, "total_market", "rows", 4L, "index", 5351.814697265625D, "addRowsIndexConstant", 5356.814697265625D, "uniques", QueryRunnerTestHelper.UNIQUES_2 ), ImmutableMap.of( - providerDimension, "upfront", + marketDimension, "upfront", "rows", 4L, "index", 4875.669677734375D, "addRowsIndexConstant", 4880.669677734375D, @@ -495,8 +495,8 @@ public class TopNQueryRunnerTest TopNQuery query = new TopNQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.allGran) - .filters(providerDimension, "upfront") - .dimension(providerDimension) + .filters(marketDimension, "upfront") + .dimension(marketDimension) .metric(QueryRunnerTestHelper.indexMetric) .threshold(4) .intervals(QueryRunnerTestHelper.firstToThird) @@ -510,7 +510,7 @@ public class TopNQueryRunnerTest new TopNResultValue( Arrays.>asList( ImmutableMap.of( - providerDimension, "upfront", + marketDimension, "upfront", "rows", 4L, "index", 4875.669677734375D, "addRowsIndexConstant", 4880.669677734375D, @@ -531,7 +531,7 @@ public class TopNQueryRunnerTest .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.allGran) .filters(QueryRunnerTestHelper.qualityDimension, "mezzanine") - .dimension(providerDimension) + .dimension(marketDimension) .metric(QueryRunnerTestHelper.indexMetric) .threshold(4) .intervals(QueryRunnerTestHelper.firstToThird) @@ -545,21 +545,21 @@ public class TopNQueryRunnerTest new TopNResultValue( Arrays.>asList( ImmutableMap.of( - providerDimension, "upfront", + marketDimension, "upfront", "rows", 2L, "index", 2591.68359375D, "addRowsIndexConstant", 2594.68359375D, "uniques", QueryRunnerTestHelper.UNIQUES_1 ), ImmutableMap.of( - providerDimension, "total_market", + marketDimension, "total_market", "rows", 2L, "index", 2508.39599609375D, "addRowsIndexConstant", 2511.39599609375D, "uniques", QueryRunnerTestHelper.UNIQUES_1 ), ImmutableMap.of( - providerDimension, "spot", + marketDimension, "spot", "rows", 2L, "index", 220.63774871826172D, "addRowsIndexConstant", 223.63774871826172D, @@ -580,7 +580,7 @@ public class TopNQueryRunnerTest .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.allGran) .filters(QueryRunnerTestHelper.qualityDimension, "mezzanine") - .dimension(providerDimension) + .dimension(marketDimension) .metric(QueryRunnerTestHelper.indexMetric) .threshold(4) .intervals( @@ -598,21 +598,21 @@ public class TopNQueryRunnerTest new TopNResultValue( Arrays.>asList( ImmutableMap.of( - providerDimension, "upfront", + marketDimension, "upfront", "rows", 1L, "index", new Float(1447.341160).doubleValue(), "addRowsIndexConstant", new Float(1449.341160).doubleValue(), "uniques", QueryRunnerTestHelper.UNIQUES_1 ), ImmutableMap.of( - providerDimension, "total_market", + marketDimension, "total_market", "rows", 1L, "index", new Float(1314.839715).doubleValue(), "addRowsIndexConstant", new Float(1316.839715).doubleValue(), "uniques", QueryRunnerTestHelper.UNIQUES_1 ), ImmutableMap.of( - providerDimension, "spot", + marketDimension, "spot", "rows", 1L, "index", new Float(109.705815).doubleValue(), "addRowsIndexConstant", new Float(111.705815).doubleValue(), @@ -632,8 +632,8 @@ public class TopNQueryRunnerTest TopNQuery query = new TopNQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.allGran) - .filters(providerDimension, "total_market", "upfront", "billyblank") - .dimension(providerDimension) + .filters(marketDimension, "total_market", "upfront", "billyblank") + .dimension(marketDimension) .metric(QueryRunnerTestHelper.indexMetric) .threshold(4) .intervals(QueryRunnerTestHelper.firstToThird) @@ -647,14 +647,14 @@ public class TopNQueryRunnerTest new TopNResultValue( Arrays.>asList( ImmutableMap.of( - providerDimension, "total_market", + marketDimension, "total_market", "rows", 4L, "index", 5351.814697265625D, "addRowsIndexConstant", 5356.814697265625D, "uniques", QueryRunnerTestHelper.UNIQUES_2 ), ImmutableMap.of( - providerDimension, "upfront", + marketDimension, "upfront", "rows", 4L, "index", 4875.669677734375D, "addRowsIndexConstant", 4880.669677734375D, @@ -674,8 +674,8 @@ public class TopNQueryRunnerTest TopNQuery query = new TopNQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.allGran) - .filters(providerDimension, "billyblank") - .dimension(providerDimension) + .filters(marketDimension, "billyblank") + .dimension(marketDimension) .metric(QueryRunnerTestHelper.indexMetric) .threshold(4) .intervals(QueryRunnerTestHelper.firstToThird) @@ -701,7 +701,7 @@ public class TopNQueryRunnerTest .fields( Lists.newArrayList( Druids.newSelectorDimFilterBuilder() - .dimension(providerDimension) + .dimension(marketDimension) .value("billyblank") .build(), Druids.newSelectorDimFilterBuilder() @@ -714,7 +714,7 @@ public class TopNQueryRunnerTest .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.allGran) .filters(andDimFilter) - .dimension(providerDimension) + .dimension(marketDimension) .metric(QueryRunnerTestHelper.indexMetric) .threshold(4) .intervals(QueryRunnerTestHelper.firstToThird) @@ -740,7 +740,7 @@ public class TopNQueryRunnerTest .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.allGran) .filters(QueryRunnerTestHelper.placementishDimension, "m") - .dimension(providerDimension) + .dimension(marketDimension) .metric(QueryRunnerTestHelper.indexMetric) .threshold(4) .intervals(QueryRunnerTestHelper.firstToThird) @@ -755,7 +755,7 @@ public class TopNQueryRunnerTest .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.allGran) .filters(QueryRunnerTestHelper.qualityDimension, "mezzanine") - .dimension(providerDimension) + .dimension(marketDimension) .metric(QueryRunnerTestHelper.indexMetric) .threshold(4) .intervals(QueryRunnerTestHelper.firstToThird) @@ -955,7 +955,7 @@ public class TopNQueryRunnerTest TopNQuery query = new TopNQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.allGran) - .dimension(providerDimension) + .dimension(marketDimension) .metric(new LexicographicTopNMetricSpec("")) .threshold(4) .intervals(QueryRunnerTestHelper.firstToThird) @@ -969,21 +969,21 @@ public class TopNQueryRunnerTest new TopNResultValue( Arrays.>asList( ImmutableMap.of( - providerDimension, "spot", + marketDimension, "spot", "rows", 18L, "index", 2231.8768157958984D, "addRowsIndexConstant", 2250.8768157958984D, "uniques", QueryRunnerTestHelper.UNIQUES_9 ), ImmutableMap.of( - providerDimension, "total_market", + marketDimension, "total_market", "rows", 4L, "index", 5351.814697265625D, "addRowsIndexConstant", 5356.814697265625D, "uniques", QueryRunnerTestHelper.UNIQUES_2 ), ImmutableMap.of( - providerDimension, "upfront", + marketDimension, "upfront", "rows", 4L, "index", 4875.669677734375D, "addRowsIndexConstant", 4880.669677734375D, @@ -1003,7 +1003,7 @@ public class TopNQueryRunnerTest TopNQuery query = new TopNQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.allGran) - .dimension(providerDimension) + .dimension(marketDimension) .metric(new LexicographicTopNMetricSpec("spot")) .threshold(4) .intervals(QueryRunnerTestHelper.firstToThird) @@ -1017,14 +1017,14 @@ public class TopNQueryRunnerTest new TopNResultValue( Arrays.>asList( ImmutableMap.of( - providerDimension, "total_market", + marketDimension, "total_market", "rows", 4L, "index", 5351.814697265625D, "addRowsIndexConstant", 5356.814697265625D, "uniques", QueryRunnerTestHelper.UNIQUES_2 ), ImmutableMap.of( - providerDimension, "upfront", + marketDimension, "upfront", "rows", 4L, "index", 4875.669677734375D, "addRowsIndexConstant", 4880.669677734375D, @@ -1044,7 +1044,7 @@ public class TopNQueryRunnerTest TopNQuery query = new TopNQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.allGran) - .dimension(providerDimension) + .dimension(marketDimension) .metric(new LexicographicTopNMetricSpec("t")) .threshold(4) .intervals(QueryRunnerTestHelper.firstToThird) @@ -1058,14 +1058,14 @@ public class TopNQueryRunnerTest new TopNResultValue( Arrays.>asList( ImmutableMap.of( - providerDimension, "total_market", + marketDimension, "total_market", "rows", 4L, "index", 5351.814697265625D, "addRowsIndexConstant", 5356.814697265625D, "uniques", QueryRunnerTestHelper.UNIQUES_2 ), ImmutableMap.of( - providerDimension, "upfront", + marketDimension, "upfront", "rows", 4L, "index", 4875.669677734375D, "addRowsIndexConstant", 4880.669677734375D, @@ -1085,7 +1085,7 @@ public class TopNQueryRunnerTest TopNQuery query = new TopNQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.allGran) - .dimension(providerDimension) + .dimension(marketDimension) .metric(new InvertedTopNMetricSpec(new LexicographicTopNMetricSpec("upfront"))) .threshold(4) .intervals(QueryRunnerTestHelper.firstToThird) @@ -1099,14 +1099,14 @@ public class TopNQueryRunnerTest new TopNResultValue( Arrays.>asList( ImmutableMap.of( - providerDimension, "total_market", + marketDimension, "total_market", "rows", 4L, "index", 5351.814697265625D, "addRowsIndexConstant", 5356.814697265625D, "uniques", QueryRunnerTestHelper.UNIQUES_2 ), ImmutableMap.of( - providerDimension, "spot", + marketDimension, "spot", "rows", 18L, "index", 2231.8768157958984D, "addRowsIndexConstant", 2250.8768157958984D, @@ -1126,7 +1126,7 @@ public class TopNQueryRunnerTest TopNQuery query = new TopNQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.allGran) - .dimension(providerDimension) + .dimension(marketDimension) .metric(new InvertedTopNMetricSpec(new LexicographicTopNMetricSpec("u"))) .threshold(4) .intervals(QueryRunnerTestHelper.firstToThird) @@ -1140,14 +1140,14 @@ public class TopNQueryRunnerTest new TopNResultValue( Arrays.>asList( ImmutableMap.of( - providerDimension, "total_market", + marketDimension, "total_market", "rows", 4L, "index", 5351.814697265625D, "addRowsIndexConstant", 5356.814697265625D, "uniques", QueryRunnerTestHelper.UNIQUES_2 ), ImmutableMap.of( - providerDimension, "spot", + marketDimension, "spot", "rows", 18L, "index", 2231.8768157958984D, "addRowsIndexConstant", 2250.8768157958984D, @@ -1169,7 +1169,7 @@ public class TopNQueryRunnerTest .granularity(QueryRunnerTestHelper.allGran) .dimension( new ExtractionDimensionSpec( - providerDimension, providerDimension, new RegexDimExtractionFn("(.)") + marketDimension, marketDimension, new RegexDimExtractionFn("(.)") ) ) .metric("rows") @@ -1185,21 +1185,21 @@ public class TopNQueryRunnerTest new TopNResultValue( Arrays.>asList( ImmutableMap.of( - providerDimension, "s", + marketDimension, "s", "rows", 18L, "index", 2231.8768157958984D, "addRowsIndexConstant", 2250.8768157958984D, "uniques", QueryRunnerTestHelper.UNIQUES_9 ), ImmutableMap.of( - providerDimension, "t", + marketDimension, "t", "rows", 4L, "index", 5351.814697265625D, "addRowsIndexConstant", 5356.814697265625D, "uniques", QueryRunnerTestHelper.UNIQUES_2 ), ImmutableMap.of( - providerDimension, "u", + marketDimension, "u", "rows", 4L, "index", 4875.669677734375D, "addRowsIndexConstant", 4880.669677734375D, @@ -1221,7 +1221,7 @@ public class TopNQueryRunnerTest .granularity(QueryRunnerTestHelper.allGran) .dimension( new ExtractionDimensionSpec( - providerDimension, providerDimension, new RegexDimExtractionFn("(.)") + marketDimension, marketDimension, new RegexDimExtractionFn("(.)") ) ) .metric(new LexicographicTopNMetricSpec(null)) @@ -1237,21 +1237,21 @@ public class TopNQueryRunnerTest new TopNResultValue( Arrays.>asList( ImmutableMap.of( - providerDimension, "s", + marketDimension, "s", "rows", 18L, "index", 2231.8768157958984D, "addRowsIndexConstant", 2250.8768157958984D, "uniques", QueryRunnerTestHelper.UNIQUES_9 ), ImmutableMap.of( - providerDimension, "t", + marketDimension, "t", "rows", 4L, "index", 5351.814697265625D, "addRowsIndexConstant", 5356.814697265625D, "uniques", QueryRunnerTestHelper.UNIQUES_2 ), ImmutableMap.of( - providerDimension, "u", + marketDimension, "u", "rows", 4L, "index", 4875.669677734375D, "addRowsIndexConstant", 4880.669677734375D, @@ -1273,7 +1273,7 @@ public class TopNQueryRunnerTest .granularity(QueryRunnerTestHelper.allGran) .dimension( new ExtractionDimensionSpec( - providerDimension, providerDimension, new RegexDimExtractionFn("..(.)") + marketDimension, marketDimension, new RegexDimExtractionFn("..(.)") ) ) .metric(new InvertedTopNMetricSpec(new LexicographicTopNMetricSpec(null))) @@ -1289,21 +1289,21 @@ public class TopNQueryRunnerTest new TopNResultValue( Arrays.>asList( ImmutableMap.of( - providerDimension, "t", + marketDimension, "t", "rows", 4L, "index", 5351.814697265625D, "addRowsIndexConstant", 5356.814697265625D, "uniques", QueryRunnerTestHelper.UNIQUES_2 ), ImmutableMap.of( - providerDimension, "o", + marketDimension, "o", "rows", 18L, "index", 2231.8768157958984D, "addRowsIndexConstant", 2250.8768157958984D, "uniques", QueryRunnerTestHelper.UNIQUES_9 ), ImmutableMap.of( - providerDimension, "f", + marketDimension, "f", "rows", 4L, "index", 4875.669677734375D, "addRowsIndexConstant", 4880.669677734375D, @@ -1325,7 +1325,7 @@ public class TopNQueryRunnerTest .granularity(QueryRunnerTestHelper.allGran) .dimension( new ExtractionDimensionSpec( - providerDimension, providerDimension, new RegexDimExtractionFn("(.)") + marketDimension, marketDimension, new RegexDimExtractionFn("(.)") ) ) .metric(new LexicographicTopNMetricSpec("spot")) @@ -1341,14 +1341,14 @@ public class TopNQueryRunnerTest new TopNResultValue( Arrays.>asList( ImmutableMap.of( - providerDimension, "t", + marketDimension, "t", "rows", 4L, "index", 5351.814697265625D, "addRowsIndexConstant", 5356.814697265625D, "uniques", QueryRunnerTestHelper.UNIQUES_2 ), ImmutableMap.of( - providerDimension, "u", + marketDimension, "u", "rows", 4L, "index", 4875.669677734375D, "addRowsIndexConstant", 4880.669677734375D, @@ -1371,7 +1371,7 @@ public class TopNQueryRunnerTest .granularity(QueryRunnerTestHelper.allGran) .dimension( new ExtractionDimensionSpec( - providerDimension, providerDimension, new RegexDimExtractionFn("(.)") + marketDimension, marketDimension, new RegexDimExtractionFn("(.)") ) ) .metric(new InvertedTopNMetricSpec(new LexicographicTopNMetricSpec("u"))) @@ -1387,14 +1387,14 @@ public class TopNQueryRunnerTest new TopNResultValue( Arrays.>asList( ImmutableMap.of( - providerDimension, "t", + marketDimension, "t", "rows", 4L, "index", 5351.814697265625D, "addRowsIndexConstant", 5356.814697265625D, "uniques", QueryRunnerTestHelper.UNIQUES_2 ), ImmutableMap.of( - providerDimension, "s", + marketDimension, "s", "rows", 18L, "index", 2231.8768157958984D, "addRowsIndexConstant", 2250.8768157958984D, @@ -1416,7 +1416,7 @@ public class TopNQueryRunnerTest .granularity(QueryRunnerTestHelper.allGran) .dimension( new ExtractionDimensionSpec( - providerDimension, providerDimension, new RegexDimExtractionFn("..(.)") + marketDimension, marketDimension, new RegexDimExtractionFn("..(.)") ) ) .metric(new InvertedTopNMetricSpec(new LexicographicTopNMetricSpec("p"))) @@ -1432,14 +1432,14 @@ public class TopNQueryRunnerTest new TopNResultValue( Arrays.>asList( ImmutableMap.of( - providerDimension, "o", + marketDimension, "o", "rows", 18L, "index", 2231.8768157958984D, "addRowsIndexConstant", 2250.8768157958984D, "uniques", QueryRunnerTestHelper.UNIQUES_9 ), ImmutableMap.of( - providerDimension, "f", + marketDimension, "f", "rows", 4L, "index", 4875.669677734375D, "addRowsIndexConstant", 4880.669677734375D, @@ -1460,7 +1460,7 @@ public class TopNQueryRunnerTest new TopNQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.allGran) - .dimension(providerDimension) + .dimension(marketDimension) .metric(new InvertedTopNMetricSpec(new NumericTopNMetricSpec(QueryRunnerTestHelper.indexMetric))) .threshold(3) .intervals(QueryRunnerTestHelper.firstToThird) @@ -1474,21 +1474,21 @@ public class TopNQueryRunnerTest new TopNResultValue( Arrays.>asList( ImmutableMap.of( - providerDimension, "spot", + marketDimension, "spot", "rows", 18L, "index", 2231.8768157958984D, "addRowsIndexConstant", 2250.8768157958984D, "uniques", QueryRunnerTestHelper.UNIQUES_9 ), ImmutableMap.of( - providerDimension, "upfront", + marketDimension, "upfront", "rows", 4L, "index", 4875.669677734375D, "addRowsIndexConstant", 4880.669677734375D, "uniques", QueryRunnerTestHelper.UNIQUES_2 ), ImmutableMap.of( - providerDimension, "total_market", + marketDimension, "total_market", "rows", 4L, "index", 5351.814697265625D, "addRowsIndexConstant", 5356.814697265625D, @@ -1508,7 +1508,7 @@ public class TopNQueryRunnerTest TopNQuery query = new TopNQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.allGran) - .dimension(providerDimension) + .dimension(marketDimension) .metric(QueryRunnerTestHelper.dependentPostAggMetric) .threshold(4) .intervals(QueryRunnerTestHelper.fullOnInterval) @@ -1538,7 +1538,7 @@ public class TopNQueryRunnerTest new TopNResultValue( Arrays.>asList( ImmutableMap.builder() - .put(providerDimension, "total_market") + .put(marketDimension, "total_market") .put("rows", 186L) .put("index", 215679.82879638672D) .put("addRowsIndexConstant", 215866.82879638672D) @@ -1552,7 +1552,7 @@ public class TopNQueryRunnerTest ) .build(), ImmutableMap.builder() - .put(providerDimension, "upfront") + .put(marketDimension, "upfront") .put("rows", 186L) .put("index", 192046.1060180664D) .put("addRowsIndexConstant", 192233.1060180664D) @@ -1566,7 +1566,7 @@ public class TopNQueryRunnerTest ) .build(), ImmutableMap.builder() - .put(providerDimension, "spot") + .put(marketDimension, "spot") .put("rows", 837L) .put("index", 95606.57232284546D) .put("addRowsIndexConstant", 96444.57232284546D) @@ -1593,7 +1593,7 @@ public class TopNQueryRunnerTest TopNQuery query = new TopNQueryBuilder() .dataSource(QueryRunnerTestHelper.dataSource) .granularity(QueryRunnerTestHelper.allGran) - .dimension(QueryRunnerTestHelper.providerDimension) + .dimension(QueryRunnerTestHelper.marketDimension) .metric(QueryRunnerTestHelper.dependentPostAggMetric) .threshold(4) .intervals(QueryRunnerTestHelper.fullOnInterval) @@ -1619,7 +1619,7 @@ public class TopNQueryRunnerTest TopNResultValue topNResult = new TopNResultValue( Arrays.>asList( ImmutableMap.builder() - .put(QueryRunnerTestHelper.providerDimension, "total_market") + .put(QueryRunnerTestHelper.marketDimension, "total_market") .put("rows", 186L) .put("index", 215679.82879638672D) .put("addRowsIndexConstant", 215866.82879638672D) @@ -1629,7 +1629,7 @@ public class TopNQueryRunnerTest .put("minIndex", 792.3260498046875D) .build(), ImmutableMap.builder() - .put(QueryRunnerTestHelper.providerDimension, "upfront") + .put(QueryRunnerTestHelper.marketDimension, "upfront") .put("rows", 186L) .put("index", 192046.1060180664D) .put("addRowsIndexConstant", 192233.1060180664D) @@ -1639,7 +1639,7 @@ public class TopNQueryRunnerTest .put("minIndex", 545.9906005859375D) .build(), ImmutableMap.builder() - .put(QueryRunnerTestHelper.providerDimension, "spot") + .put(QueryRunnerTestHelper.marketDimension, "spot") .put("rows", 837L) .put("index", 95606.57232284546D) .put("addRowsIndexConstant", 96444.57232284546D) diff --git a/processing/src/test/java/io/druid/query/topn/TopNQueryTest.java b/processing/src/test/java/io/druid/query/topn/TopNQueryTest.java index f2f4ac22f3d..cfe6978e61b 100644 --- a/processing/src/test/java/io/druid/query/topn/TopNQueryTest.java +++ b/processing/src/test/java/io/druid/query/topn/TopNQueryTest.java @@ -42,7 +42,7 @@ import static io.druid.query.QueryRunnerTestHelper.commonAggregators; import static io.druid.query.QueryRunnerTestHelper.dataSource; import static io.druid.query.QueryRunnerTestHelper.fullOnInterval; import static io.druid.query.QueryRunnerTestHelper.indexMetric; -import static io.druid.query.QueryRunnerTestHelper.providerDimension; +import static io.druid.query.QueryRunnerTestHelper.marketDimension; public class TopNQueryTest { @@ -54,7 +54,7 @@ public class TopNQueryTest Query query = new TopNQueryBuilder() .dataSource(dataSource) .granularity(allGran) - .dimension(providerDimension) + .dimension(marketDimension) .metric(indexMetric) .threshold(4) .intervals(fullOnInterval) diff --git a/processing/src/test/java/io/druid/query/topn/TopNUnionQueryTest.java b/processing/src/test/java/io/druid/query/topn/TopNUnionQueryTest.java index 7dc7b645cad..d9975f39153 100644 --- a/processing/src/test/java/io/druid/query/topn/TopNUnionQueryTest.java +++ b/processing/src/test/java/io/druid/query/topn/TopNUnionQueryTest.java @@ -98,7 +98,7 @@ public class TopNUnionQueryTest TopNQuery query = new TopNQueryBuilder() .dataSource(QueryRunnerTestHelper.unionDataSource) .granularity(QueryRunnerTestHelper.allGran) - .dimension(QueryRunnerTestHelper.providerDimension) + .dimension(QueryRunnerTestHelper.marketDimension) .metric(QueryRunnerTestHelper.dependentPostAggMetric) .threshold(4) .intervals(QueryRunnerTestHelper.fullOnInterval) @@ -128,7 +128,7 @@ public class TopNUnionQueryTest new TopNResultValue( Arrays.>asList( ImmutableMap.builder() - .put(QueryRunnerTestHelper.providerDimension, "total_market") + .put(QueryRunnerTestHelper.marketDimension, "total_market") .put("rows", 744L) .put("index", 862719.3151855469D) .put("addRowsIndexConstant", 863464.3151855469D) @@ -142,7 +142,7 @@ public class TopNUnionQueryTest ) .build(), ImmutableMap.builder() - .put(QueryRunnerTestHelper.providerDimension, "upfront") + .put(QueryRunnerTestHelper.marketDimension, "upfront") .put("rows", 744L) .put("index", 768184.4240722656D) .put("addRowsIndexConstant", 768929.4240722656D) @@ -156,7 +156,7 @@ public class TopNUnionQueryTest ) .build(), ImmutableMap.builder() - .put(QueryRunnerTestHelper.providerDimension, "spot") + .put(QueryRunnerTestHelper.marketDimension, "spot") .put("rows", 3348L) .put("index", 382426.28929138184D) .put("addRowsIndexConstant", 385775.28929138184D) diff --git a/processing/src/test/java/io/druid/segment/AppendTest.java b/processing/src/test/java/io/druid/segment/AppendTest.java index 13a37ff2e1a..1ddb8122f94 100644 --- a/processing/src/test/java/io/druid/segment/AppendTest.java +++ b/processing/src/test/java/io/druid/segment/AppendTest.java @@ -79,7 +79,7 @@ public class AppendTest final QueryGranularity allGran = QueryGranularity.ALL; final String dimensionValue = "dimension"; final String valueValue = "value"; - final String providerDimension = "provider"; + final String marketDimension = "market"; final String qualityDimension = "quality"; final String placementDimension = "placement"; final String placementishDimension = "placementish"; @@ -309,7 +309,7 @@ public class AppendTest new TopNResultValue( Arrays.>asList( ImmutableMap.builder() - .put("provider", "spot") + .put("market", "spot") .put("rows", 3L) .put("index", 300.0D) .put("addRowsIndexConstant", 304.0D) @@ -319,7 +319,7 @@ public class AppendTest .build(), new HashMap() {{ - put("provider", null); + put("market", null); put("rows", 3L); put("index", 200.0D); put("addRowsIndexConstant", 204.0D); @@ -328,7 +328,7 @@ public class AppendTest put("minIndex", 0.0); }}, ImmutableMap.builder() - .put("provider", "total_market") + .put("market", "total_market") .put("rows", 2L) .put("index", 200.0D) .put("addRowsIndexConstant", 203.0D) @@ -355,7 +355,7 @@ public class AppendTest new TopNResultValue( Arrays.>asList( ImmutableMap.builder() - .put("provider", "total_market") + .put("market", "total_market") .put("rows", 3L) .put("index", 300.0D) .put("addRowsIndexConstant", 304.0D) @@ -365,7 +365,7 @@ public class AppendTest .build(), new HashMap() {{ - put("provider", null); + put("market", null); put("rows", 3L); put("index", 100.0D); put("addRowsIndexConstant", 104.0D); @@ -374,7 +374,7 @@ public class AppendTest put("minIndex", 0.0); }}, ImmutableMap.builder() - .put("provider", "spot") + .put("market", "spot") .put("rows", 1L) .put("index", 100.0D) .put("addRowsIndexConstant", 102.0D) @@ -401,7 +401,7 @@ public class AppendTest new TopNResultValue( Arrays.>asList( ImmutableMap.builder() - .put("provider", "spot") + .put("market", "spot") .put("rows", 1L) .put("index", 100.0D) .put("addRowsIndexConstant", 102.0D) @@ -447,7 +447,7 @@ public class AppendTest new SearchHit(placementishDimension, "a"), new SearchHit(qualityDimension, "automotive"), new SearchHit(placementDimension, "mezzanine"), - new SearchHit(providerDimension, "total_market") + new SearchHit(marketDimension, "total_market") ) ) ) @@ -468,7 +468,7 @@ public class AppendTest Arrays.asList( new SearchHit(placementishDimension, "a"), new SearchHit(placementDimension, "mezzanine"), - new SearchHit(providerDimension, "total_market") + new SearchHit(marketDimension, "total_market") ) ) ) @@ -488,7 +488,7 @@ public class AppendTest new SearchResultValue( Arrays.asList( new SearchHit(placementDimension, "mezzanine"), - new SearchHit(providerDimension, "total_market") + new SearchHit(marketDimension, "total_market") ) ) ) @@ -509,7 +509,7 @@ public class AppendTest Arrays.asList( new SearchHit(placementishDimension, "a"), new SearchHit(placementDimension, "mezzanine"), - new SearchHit(providerDimension, "total_market") + new SearchHit(marketDimension, "total_market") ) ) ) @@ -543,7 +543,7 @@ public class AppendTest .dataSource(dataSource) .granularity(allGran) .intervals(fullOnInterval) - .filters(providerDimension, "breakstuff") + .filters(marketDimension, "breakstuff") .aggregators( Lists.newArrayList( Iterables.concat( @@ -593,11 +593,11 @@ public class AppendTest .fields( Arrays.asList( Druids.newSelectorDimFilterBuilder() - .dimension(providerDimension) + .dimension(marketDimension) .value("spot") .build(), Druids.newSelectorDimFilterBuilder() - .dimension(providerDimension) + .dimension(marketDimension) .value("total_market") .build() ) @@ -623,7 +623,7 @@ public class AppendTest return new TopNQueryBuilder() .dataSource(dataSource) .granularity(allGran) - .dimension(providerDimension) + .dimension(marketDimension) .metric(indexMetric) .threshold(3) .intervals(fullOnInterval) @@ -647,7 +647,7 @@ public class AppendTest return new TopNQueryBuilder() .dataSource(dataSource) .granularity(allGran) - .dimension(providerDimension) + .dimension(marketDimension) .metric(indexMetric) .threshold(3) .filters( @@ -655,7 +655,7 @@ public class AppendTest .fields( Arrays.asList( Druids.newSelectorDimFilterBuilder() - .dimension(providerDimension) + .dimension(marketDimension) .value("spot") .build(), Druids.newSelectorDimFilterBuilder() @@ -699,7 +699,7 @@ public class AppendTest Druids.newNotDimFilterBuilder() .field( Druids.newSelectorDimFilterBuilder() - .dimension(providerDimension) + .dimension(marketDimension) .value("spot") .build() ).build() diff --git a/processing/src/test/java/io/druid/segment/SchemalessTestFull.java b/processing/src/test/java/io/druid/segment/SchemalessTestFull.java index 83f6a62aa99..90b138aca5a 100644 --- a/processing/src/test/java/io/druid/segment/SchemalessTestFull.java +++ b/processing/src/test/java/io/druid/segment/SchemalessTestFull.java @@ -71,7 +71,7 @@ public class SchemalessTestFull final QueryGranularity allGran = QueryGranularity.ALL; final String dimensionValue = "dimension"; final String valueValue = "value"; - final String providerDimension = "provider"; + final String marketDimension = "market"; final String qualityDimension = "quality"; final String placementDimension = "placement"; final String placementishDimension = "placementish"; @@ -133,7 +133,7 @@ public class SchemalessTestFull new TopNResultValue( Arrays.>asList( ImmutableMap.builder() - .put("provider", "spot") + .put("market", "spot") .put("rows", 1L) .put("index", 100.0D) .put("addRowsIndexConstant", 102.0D) @@ -142,7 +142,7 @@ public class SchemalessTestFull .put("minIndex", 100.0) .build(), ImmutableMap.builder() - .put("provider", "total_market") + .put("market", "total_market") .put("rows", 1L) .put("index", 100.0D) .put("addRowsIndexConstant", 102.0D) @@ -161,7 +161,7 @@ public class SchemalessTestFull new TopNResultValue( Arrays.>asList( ImmutableMap.builder() - .put("provider", "spot") + .put("market", "spot") .put("rows", 1L) .put("index", 100.0D) .put("addRowsIndexConstant", 102.0D) @@ -182,7 +182,7 @@ public class SchemalessTestFull new SearchHit(placementishDimension, "a"), new SearchHit(qualityDimension, "automotive"), new SearchHit(placementDimension, "mezzanine"), - new SearchHit(providerDimension, "total_market") + new SearchHit(marketDimension, "total_market") ) ) ) @@ -268,7 +268,7 @@ public class SchemalessTestFull new TopNResultValue( Arrays.>asList( ImmutableMap.builder() - .put("provider", "") + .put("market", "") .put("rows", 2L) .put("index", 200.0D) .put("addRowsIndexConstant", 203.0D) @@ -277,7 +277,7 @@ public class SchemalessTestFull .put("minIndex", 100.0) .build(), ImmutableMap.builder() - .put("provider", "spot") + .put("market", "spot") .put("rows", 1L) .put("index", 100.0D) .put("addRowsIndexConstant", 102.0D) @@ -296,7 +296,7 @@ public class SchemalessTestFull new TopNResultValue( Arrays.>asList( ImmutableMap.builder() - .put("provider", "") + .put("market", "") .put("rows", 1L) .put("index", 100.0D) .put("addRowsIndexConstant", 102.0D) @@ -305,7 +305,7 @@ public class SchemalessTestFull .put("minIndex", 100.0) .build(), ImmutableMap.builder() - .put("provider", "spot") + .put("market", "spot") .put("rows", 1L) .put("index", 100.0D) .put("addRowsIndexConstant", 102.0D) @@ -407,7 +407,7 @@ public class SchemalessTestFull new TopNResultValue( Arrays.>asList( ImmutableMap.builder() - .put("provider", "spot") + .put("market", "spot") .put("rows", 1L) .put("index", 100.0D) .put("addRowsIndexConstant", 102.0D) @@ -417,7 +417,7 @@ public class SchemalessTestFull .build(), new HashMap() {{ - put("provider", null); + put("market", null); put("rows", 1L); put("index", 0.0D); put("addRowsIndexConstant", 2.0D); @@ -436,7 +436,7 @@ public class SchemalessTestFull new TopNResultValue( Arrays.>asList( ImmutableMap.builder() - .put("provider", "spot") + .put("market", "spot") .put("rows", 1L) .put("index", 100.0D) .put("addRowsIndexConstant", 102.0D) @@ -540,7 +540,7 @@ public class SchemalessTestFull new TopNResultValue( Arrays.>asList( ImmutableMap.builder() - .put("provider", "spot") + .put("market", "spot") .put("rows", 1L) .put("index", 100.0D) .put("addRowsIndexConstant", 102.0D) @@ -549,7 +549,7 @@ public class SchemalessTestFull .put("minIndex", 100.0) .build(), ImmutableMap.builder() - .put("provider", "total_market") + .put("market", "total_market") .put("rows", 1L) .put("index", 100.0D) .put("addRowsIndexConstant", 102.0D) @@ -568,7 +568,7 @@ public class SchemalessTestFull new TopNResultValue( Arrays.>asList( ImmutableMap.builder() - .put("provider", "spot") + .put("market", "spot") .put("rows", 1L) .put("index", 100.0D) .put("addRowsIndexConstant", 102.0D) @@ -587,7 +587,7 @@ public class SchemalessTestFull new SearchResultValue( Arrays.asList( new SearchHit(qualityDimension, "automotive"), - new SearchHit(providerDimension, "total_market") + new SearchHit(marketDimension, "total_market") ) ) ) @@ -658,7 +658,7 @@ public class SchemalessTestFull new TopNResultValue( Arrays.>asList( ImmutableMap.builder() - .put("provider", "spot") + .put("market", "spot") .put("rows", 2L) .put("index", 200.0D) .put("addRowsIndexConstant", 203.0D) @@ -755,7 +755,7 @@ public class SchemalessTestFull new TopNResultValue( Arrays.>asList( ImmutableMap.builder() - .put("provider", "spot") + .put("market", "spot") .put("rows", 1L) .put("index", 100.0D) .put("addRowsIndexConstant", 102.0D) @@ -765,7 +765,7 @@ public class SchemalessTestFull .build(), new HashMap() {{ - put("provider", null); + put("market", null); put("rows", 1L); put("index", 0.0D); put("addRowsIndexConstant", 2.0D); @@ -784,7 +784,7 @@ public class SchemalessTestFull new TopNResultValue( Arrays.>asList( ImmutableMap.builder() - .put("provider", "spot") + .put("market", "spot") .put("rows", 1L) .put("index", 100.0D) .put("addRowsIndexConstant", 102.0D) @@ -942,7 +942,7 @@ public class SchemalessTestFull new TopNResultValue( Arrays.>asList( ImmutableMap.builder() - .put("provider", "spot") + .put("market", "spot") .put("rows", 1L) .put("index", 200.0D) .put("addRowsIndexConstant", 202.0D) @@ -1042,7 +1042,7 @@ public class SchemalessTestFull Arrays.>asList( new HashMap() {{ - put("provider", null); + put("market", null); put("rows", 2L); put("index", 200.0D); put("addRowsIndexConstant", 203.0D); @@ -1051,7 +1051,7 @@ public class SchemalessTestFull put("minIndex", 100.0); }}, ImmutableMap.builder() - .put("provider", "spot") + .put("market", "spot") .put("rows", 1L) .put("index", 100.0D) .put("addRowsIndexConstant", 102.0D) @@ -1070,7 +1070,7 @@ public class SchemalessTestFull new TopNResultValue( Arrays.>asList( ImmutableMap.builder() - .put("provider", "spot") + .put("market", "spot") .put("rows", 1L) .put("index", 100.0D) .put("addRowsIndexConstant", 102.0D) @@ -1175,7 +1175,7 @@ public class SchemalessTestFull new TopNResultValue( Arrays.>asList( ImmutableMap.builder() - .put("provider", "spot") + .put("market", "spot") .put("rows", 4L) .put("index", 400.0D) .put("addRowsIndexConstant", 405.0D) @@ -1184,7 +1184,7 @@ public class SchemalessTestFull .put("minIndex", 100.0) .build(), ImmutableMap.builder() - .put("provider", "") + .put("market", "") .put("rows", 3L) .put("index", 200.0D) .put("addRowsIndexConstant", 204.0D) @@ -1193,7 +1193,7 @@ public class SchemalessTestFull .put("minIndex", 0.0) .build(), ImmutableMap.builder() - .put("provider", "total_market") + .put("market", "total_market") .put("rows", 2L) .put("index", 200.0D) .put("addRowsIndexConstant", 203.0D) @@ -1212,7 +1212,7 @@ public class SchemalessTestFull new TopNResultValue( Arrays.>asList( ImmutableMap.builder() - .put("provider", "spot") + .put("market", "spot") .put("rows", 4L) .put("index", 400.0D) .put("addRowsIndexConstant", 405.0D) @@ -1221,7 +1221,7 @@ public class SchemalessTestFull .put("minIndex", 100.0) .build(), ImmutableMap.builder() - .put("provider", "") + .put("market", "") .put("rows", 1L) .put("index", 100.0D) .put("addRowsIndexConstant", 102.0D) @@ -1242,7 +1242,7 @@ public class SchemalessTestFull new SearchHit(placementishDimension, "a"), new SearchHit(qualityDimension, "automotive"), new SearchHit(placementDimension, "mezzanine"), - new SearchHit(providerDimension, "total_market") + new SearchHit(marketDimension, "total_market") ) ) ) @@ -1403,7 +1403,7 @@ public class SchemalessTestFull .dataSource(dataSource) .granularity(allGran) .intervals(fullOnInterval) - .filters(providerDimension, "spot") + .filters(marketDimension, "spot") .aggregators( Lists.newArrayList( Iterables.concat( @@ -1432,7 +1432,7 @@ public class SchemalessTestFull TopNQuery query = new TopNQueryBuilder() .dataSource(dataSource) .granularity(allGran) - .dimension(providerDimension) + .dimension(marketDimension) .metric(indexMetric) .threshold(3) .intervals(fullOnInterval) @@ -1464,8 +1464,8 @@ public class SchemalessTestFull TopNQuery query = new TopNQueryBuilder() .dataSource(dataSource) .granularity(allGran) - .dimension(providerDimension) - .filters(providerDimension, "spot") + .dimension(marketDimension) + .filters(marketDimension, "spot") .metric(indexMetric) .threshold(3) .intervals(fullOnInterval) @@ -1513,7 +1513,7 @@ public class SchemalessTestFull SearchQuery query = Druids.newSearchQueryBuilder() .dataSource(dataSource) .granularity(allGran) - .filters(providerDimension, "spot") + .filters(marketDimension, "spot") .intervals(fullOnInterval) .query("a") .build(); diff --git a/processing/src/test/java/io/druid/segment/SchemalessTestSimple.java b/processing/src/test/java/io/druid/segment/SchemalessTestSimple.java index 85226b3256d..524aa5b8668 100644 --- a/processing/src/test/java/io/druid/segment/SchemalessTestSimple.java +++ b/processing/src/test/java/io/druid/segment/SchemalessTestSimple.java @@ -97,7 +97,7 @@ public class SchemalessTestSimple final QueryGranularity allGran = QueryGranularity.ALL; final String dimensionValue = "dimension"; final String valueValue = "value"; - final String providerDimension = "provider"; + final String marketDimension = "market"; final String qualityDimension = "quality"; final String placementDimension = "placement"; final String placementishDimension = "placementish"; @@ -175,7 +175,7 @@ public class SchemalessTestSimple TopNQuery query = new TopNQueryBuilder() .dataSource(dataSource) .granularity(allGran) - .dimension(providerDimension) + .dimension(marketDimension) .metric(indexMetric) .threshold(3) .intervals(fullOnInterval) @@ -200,7 +200,7 @@ public class SchemalessTestSimple Arrays.asList( new DimensionAndMetricValueExtractor( ImmutableMap.builder() - .put("provider", "spot") + .put("market", "spot") .put("rows", 4L) .put("index", 400.0D) .put("addRowsIndexConstant", 405.0D) @@ -211,7 +211,7 @@ public class SchemalessTestSimple ), new DimensionAndMetricValueExtractor( ImmutableMap.builder() - .put("provider", "") + .put("market", "") .put("rows", 2L) .put("index", 200.0D) .put("addRowsIndexConstant", 203.0D) @@ -222,7 +222,7 @@ public class SchemalessTestSimple ), new DimensionAndMetricValueExtractor( ImmutableMap.builder() - .put("provider", "total_market") + .put("market", "total_market") .put("rows", 2L) .put("index", 200.0D) .put("addRowsIndexConstant", 203.0D) @@ -258,7 +258,7 @@ public class SchemalessTestSimple new SearchHit(placementishDimension, "a"), new SearchHit(qualityDimension, "automotive"), new SearchHit(placementDimension, "mezzanine"), - new SearchHit(providerDimension, "total_market") + new SearchHit(marketDimension, "total_market") ) ) ) diff --git a/processing/src/test/java/io/druid/segment/TestIndex.java b/processing/src/test/java/io/druid/segment/TestIndex.java index bb83dac77ce..bba10185dee 100644 --- a/processing/src/test/java/io/druid/segment/TestIndex.java +++ b/processing/src/test/java/io/druid/segment/TestIndex.java @@ -59,14 +59,14 @@ public class TestIndex public static final String[] COLUMNS = new String[]{ "ts", - "provider", + "market", "quALIty", "plAcEmEnT", "pLacementish", "iNdEx", "qualiTy_Uniques" }; - public static final String[] DIMENSIONS = new String[]{"provider", "quALIty", "plAcEmEnT", "pLacementish"}; + public static final String[] DIMENSIONS = new String[]{"market", "quALIty", "plAcEmEnT", "pLacementish"}; public static final String[] METRICS = new String[]{"iNdEx"}; private static final Interval DATA_INTERVAL = new Interval("2011-01-12T00:00:00.000Z/2011-05-01T00:00:00.000Z"); private static final AggregatorFactory[] METRIC_AGGS = new AggregatorFactory[]{ diff --git a/processing/src/test/resources/append.json.1 b/processing/src/test/resources/append.json.1 index aa55a99694a..efce43f58e3 100644 --- a/processing/src/test/resources/append.json.1 +++ b/processing/src/test/resources/append.json.1 @@ -4,7 +4,7 @@ }, { "timestamp":"2011-01-13T00:00:00.000Z", - "provider":"spot", + "market":"spot", "quality":"automotive", "placement":"preferred", "placementish":["a", "preferred"], @@ -12,7 +12,7 @@ }, { "timestamp":"2011-01-14T00:00:00.000Z", - "provider":"spot", + "market":"spot", "quality":"automotive", "index":100.000000 }, diff --git a/processing/src/test/resources/append.json.2 b/processing/src/test/resources/append.json.2 index fd3f916e9ec..88d7501132d 100644 --- a/processing/src/test/resources/append.json.2 +++ b/processing/src/test/resources/append.json.2 @@ -1,14 +1,14 @@ [ { "timestamp":"2011-01-14T22:00:00.000Z", - "provider":"total_market", + "market":"total_market", "placement":"preferred", "placementish":["h", "preferred"], "index":100.000000 }, { "timestamp":"2011-01-14T23:00:00.000Z", - "provider":"total_market", + "market":"total_market", "quality":"business", "placement":"mezzanine", "placementish":["p", "preferred"], @@ -17,7 +17,7 @@ { "timestamp":"2011-01-15T00:00:00.000Z", "placementish":"preferred", - "provider":"spot", + "market":"spot", "index":100.000000 }, { diff --git a/processing/src/test/resources/append.json.3 b/processing/src/test/resources/append.json.3 index 7a963dc4e78..de15d125969 100644 --- a/processing/src/test/resources/append.json.3 +++ b/processing/src/test/resources/append.json.3 @@ -4,7 +4,7 @@ }, { "timestamp":"2011-01-13T00:00:00.000Z", - "provider":"spot", + "market":"spot", "quality":"automotive", "placement":"preferred", "placementish":["a", "preferred"], @@ -12,7 +12,7 @@ }, { "timestamp":"2011-01-14T00:00:00.000Z", - "provider":"total_market", + "market":"total_market", "index":100.000000 }, { diff --git a/processing/src/test/resources/append.json.4 b/processing/src/test/resources/append.json.4 index 5049fdc5e69..1a8d7d5d8d9 100644 --- a/processing/src/test/resources/append.json.4 +++ b/processing/src/test/resources/append.json.4 @@ -1,14 +1,14 @@ [ { "timestamp":"2011-01-13T00:00:00.000Z", - "provider":"total_market", + "market":"total_market", "placement":"preferred", "placementish":["h", "preferred"], "index":100.000000 }, { "timestamp":"2011-01-13T01:00:00.000Z", - "provider":"total_market", + "market":"total_market", "placement":"mezzanine", "placementish":["p", "preferred"], "index":100.000000 @@ -16,7 +16,7 @@ { "timestamp":"2011-01-13T15:00:00.000Z", "placementish":"preferred", - "provider":"spot", + "market":"spot", "index":100.000000 }, { diff --git a/processing/src/test/resources/append.json.5 b/processing/src/test/resources/append.json.5 index 0119fead368..a59d23c13c5 100644 --- a/processing/src/test/resources/append.json.5 +++ b/processing/src/test/resources/append.json.5 @@ -1,32 +1,32 @@ [ { "timestamp":"2011-01-12T00:00:00.000Z", - "provider":"breakstuff", + "market":"breakstuff", "index":100.000000 }, { "timestamp":"2011-01-14T00:00:00.000Z", - "provider":"breakstuff", + "market":"breakstuff", "index":100.000000 }, { "timestamp":"2011-01-16T00:00:00.000Z", - "provider":"breakstuff", + "market":"breakstuff", "index":100.000000 }, { "timestamp":"2011-01-17T00:00:00.000Z", - "provider":"breakstuff", + "market":"breakstuff", "index":100.000000 }, { "timestamp":"2011-01-19T00:00:00.000Z", - "provider":"breakstuff", + "market":"breakstuff", "index":100.000000 }, { "timestamp":"2011-01-21T00:00:00.000Z", - "provider":"breakstuff", + "market":"breakstuff", "index":100.000000 } ] \ No newline at end of file diff --git a/processing/src/test/resources/append.json.6 b/processing/src/test/resources/append.json.6 index 386769ce0ef..56ff8a3faad 100644 --- a/processing/src/test/resources/append.json.6 +++ b/processing/src/test/resources/append.json.6 @@ -1,12 +1,12 @@ [ { "timestamp":"2011-01-13T00:00:00.000Z", - "provider":"breakstuff", + "market":"breakstuff", "index":100.000000 }, { "timestamp":"2011-01-15T00:00:00.000Z", - "provider":"spot", + "market":"spot", "index":100.000000 } ] \ No newline at end of file diff --git a/processing/src/test/resources/append.json.7 b/processing/src/test/resources/append.json.7 index 8645df52b8f..cc8089f8981 100644 --- a/processing/src/test/resources/append.json.7 +++ b/processing/src/test/resources/append.json.7 @@ -1,12 +1,12 @@ [ { "timestamp":"2011-01-18T00:00:00.000Z", - "provider":"spot", + "market":"spot", "index":100.000000 }, { "timestamp":"2011-01-20T00:00:00.000Z", - "provider":"spot", + "market":"spot", "index":100.000000 } ] \ No newline at end of file diff --git a/processing/src/test/resources/druid.sample.json b/processing/src/test/resources/druid.sample.json index e188e7be089..a3cddb46ff0 100644 --- a/processing/src/test/resources/druid.sample.json +++ b/processing/src/test/resources/druid.sample.json @@ -4,7 +4,7 @@ }, { "timestamp":"2011-01-12T00:00:00.000Z", - "provider":"spot", + "market":"spot", "quality":"automotive", "placement":"preferred", "placementish":["a", "preferred"], @@ -12,7 +12,7 @@ }, { "timestamp":"2011-01-12T00:00:00.000Z", - "provider":"spot", + "market":"spot", "quality":"automotive", "index":100.000000 }, @@ -23,14 +23,14 @@ }, { "timestamp":"2011-01-13T00:00:00.000Z", - "provider":"total_market", + "market":"total_market", "placementish":["h", "preferred"], "placement":"preferred", "index":100.000000 }, { "timestamp":"2011-01-13T00:00:00.000Z", - "provider":"total_market", + "market":"total_market", "placementish":["p", "preferred"], "quality":"business", "placement":"mezzanine", @@ -39,7 +39,7 @@ { "timestamp":"2011-01-12T00:00:00.000Z", "placementish":"preferred", - "provider":"spot", + "market":"spot", "index":100.000000 }, { @@ -55,12 +55,12 @@ }, { "timestamp":"2011-01-12T00:00:00.000Z", - "provider":"", + "market":"", "index":100.000000 }, { "timestamp":"2011-01-12T00:00:00.000Z", - "provider":["", "spot"], + "market":["", "spot"], "index":100.000000 } ] \ No newline at end of file diff --git a/processing/src/test/resources/druid.sample.json.bottom b/processing/src/test/resources/druid.sample.json.bottom index a7b3b648a2a..75ea3502c6e 100644 --- a/processing/src/test/resources/druid.sample.json.bottom +++ b/processing/src/test/resources/druid.sample.json.bottom @@ -6,14 +6,14 @@ }, { "timestamp":"2011-01-13T00:00:00.000Z", - "provider":"total_market", + "market":"total_market", "placement":"preferred", "placementish":["h", "preferred"], "index":100.000000 }, { "timestamp":"2011-01-13T00:00:00.000Z", - "provider":"total_market", + "market":"total_market", "quality":"business", "placement":"mezzanine", "placementish":["p", "preferred"], @@ -22,7 +22,7 @@ { "timestamp":"2011-01-12T00:00:00.000Z", "placementish":"preferred", - "provider":"spot", + "market":"spot", "index":100.000000 }, { @@ -38,12 +38,12 @@ }, { "timestamp":"2011-01-12T00:00:00.000Z", - "provider":"", + "market":"", "index":100.000000 }, { "timestamp":"2011-01-12T00:00:00.000Z", - "provider":["", "spot"], + "market":["", "spot"], "index":100.000000 } ] \ No newline at end of file diff --git a/processing/src/test/resources/druid.sample.json.top b/processing/src/test/resources/druid.sample.json.top index 8439291578d..4d1834ca27a 100644 --- a/processing/src/test/resources/druid.sample.json.top +++ b/processing/src/test/resources/druid.sample.json.top @@ -4,7 +4,7 @@ }, { "timestamp":"2011-01-12T00:00:00.000Z", - "provider":"spot", + "market":"spot", "quality":"automotive", "placement":"preferred", "placementish":["a", "preferred"], @@ -12,7 +12,7 @@ }, { "timestamp":"2011-01-12T00:00:00.000Z", - "provider":"spot", + "market":"spot", "quality":"automotive", "index":100.000000 }