Updated druid-api version to always sort dimension names, these tests needed fixing

This commit is contained in:
fjy 2014-10-10 14:08:14 -07:00 committed by Xavier Léauté
parent ae4f2193d5
commit bb90432862
26 changed files with 262 additions and 261 deletions

View File

@ -157,8 +157,8 @@ public class ApproximateHistogramGroupByQueryTest
.setDimensions( .setDimensions(
Arrays.<DimensionSpec>asList( Arrays.<DimensionSpec>asList(
new DefaultDimensionSpec( new DefaultDimensionSpec(
QueryRunnerTestHelper.providerDimension, QueryRunnerTestHelper.marketDimension,
"proViderAlias" "marKetAlias"
) )
) )
) )
@ -167,7 +167,7 @@ public class ApproximateHistogramGroupByQueryTest
new DefaultLimitSpec( new DefaultLimitSpec(
Lists.newArrayList( Lists.newArrayList(
new OrderByColumnSpec( new OrderByColumnSpec(
"proViderAlias", "marKetAlias",
OrderByColumnSpec.Direction.DESCENDING OrderByColumnSpec.Direction.DESCENDING
) )
), 1 ), 1
@ -189,7 +189,7 @@ public class ApproximateHistogramGroupByQueryTest
List<Row> expectedResults = Arrays.asList( List<Row> expectedResults = Arrays.asList(
GroupByQueryRunnerTestHelper.createExpectedRow( GroupByQueryRunnerTestHelper.createExpectedRow(
"1970-01-01T00:00:00.000Z", "1970-01-01T00:00:00.000Z",
"provideralias", "upfront", "marketalias", "upfront",
"rows", 186L, "rows", 186L,
"quantile", 880.9881f, "quantile", 880.9881f,
"apphisto", "apphisto",

View File

@ -113,7 +113,7 @@ public class ApproximateHistogramTopNQueryTest
TopNQuery query = new TopNQueryBuilder() TopNQuery query = new TopNQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.dimension(QueryRunnerTestHelper.providerDimension) .dimension(QueryRunnerTestHelper.marketDimension)
.metric(QueryRunnerTestHelper.dependentPostAggMetric) .metric(QueryRunnerTestHelper.dependentPostAggMetric)
.threshold(4) .threshold(4)
.intervals(QueryRunnerTestHelper.fullOnInterval) .intervals(QueryRunnerTestHelper.fullOnInterval)
@ -144,7 +144,7 @@ public class ApproximateHistogramTopNQueryTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put(QueryRunnerTestHelper.providerDimension, "total_market") .put(QueryRunnerTestHelper.marketDimension, "total_market")
.put("rows", 186L) .put("rows", 186L)
.put("index", 215679.82879638672D) .put("index", 215679.82879638672D)
.put("addRowsIndexConstant", 215866.82879638672D) .put("addRowsIndexConstant", 215866.82879638672D)
@ -175,7 +175,7 @@ public class ApproximateHistogramTopNQueryTest
) )
.build(), .build(),
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put(QueryRunnerTestHelper.providerDimension, "upfront") .put(QueryRunnerTestHelper.marketDimension, "upfront")
.put("rows", 186L) .put("rows", 186L)
.put("index", 192046.1060180664D) .put("index", 192046.1060180664D)
.put("addRowsIndexConstant", 192233.1060180664D) .put("addRowsIndexConstant", 192233.1060180664D)
@ -206,7 +206,7 @@ public class ApproximateHistogramTopNQueryTest
) )
.build(), .build(),
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put(QueryRunnerTestHelper.providerDimension, "spot") .put(QueryRunnerTestHelper.marketDimension, "spot")
.put("rows", 837L) .put("rows", 837L)
.put("index", 95606.57232284546D) .put("index", 95606.57232284546D)
.put("addRowsIndexConstant", 96444.57232284546D) .put("addRowsIndexConstant", 96444.57232284546D)

View File

@ -30,7 +30,7 @@
<connection>scm:git:ssh://git@github.com/metamx/druid.git</connection> <connection>scm:git:ssh://git@github.com/metamx/druid.git</connection>
<developerConnection>scm:git:ssh://git@github.com/metamx/druid.git</developerConnection> <developerConnection>scm:git:ssh://git@github.com/metamx/druid.git</developerConnection>
<url>http://www.github.com/metamx/druid</url> <url>http://www.github.com/metamx/druid</url>
<tag>druid-0.6.131-SNAPSHOT</tag> <tag>druid-0.6.159-SNAPSHOT</tag>
</scm> </scm>
<prerequisites> <prerequisites>
@ -41,7 +41,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<metamx.java-util.version>0.26.9</metamx.java-util.version> <metamx.java-util.version>0.26.9</metamx.java-util.version>
<apache.curator.version>2.6.0</apache.curator.version> <apache.curator.version>2.6.0</apache.curator.version>
<druid.api.version>0.2.14</druid.api.version> <druid.api.version>0.2.15</druid.api.version>
</properties> </properties>
<modules> <modules>

View File

@ -85,6 +85,7 @@ public class ProtoBufInputRowParserTest
InputRow row = parser.parse(ByteBuffer.wrap(out.toByteArray())); InputRow row = parser.parse(ByteBuffer.wrap(out.toByteArray()));
System.out.println(row); System.out.println(row);
Arrays.sort(DIMENSIONS);
assertEquals(Arrays.asList(DIMENSIONS), row.getDimensions()); assertEquals(Arrays.asList(DIMENSIONS), row.getDimensions());
assertEquals(dateTime.getMillis(), row.getTimestampFromEpoch()); assertEquals(dateTime.getMillis(), row.getTimestampFromEpoch());

View File

@ -82,7 +82,7 @@ public class QueryRunnerTestHelper
); );
public static final QueryGranularity dayGran = QueryGranularity.DAY; public static final QueryGranularity dayGran = QueryGranularity.DAY;
public static final QueryGranularity allGran = QueryGranularity.ALL; 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 qualityDimension = "quality";
public static final String placementDimension = "placement"; public static final String placementDimension = "placement";
public static final String placementishDimension = "placementish"; public static final String placementishDimension = "placementish";

View File

@ -742,8 +742,8 @@ public class GroupByQueryRunnerTest
.setDimensions( .setDimensions(
Arrays.<DimensionSpec>asList( Arrays.<DimensionSpec>asList(
new DefaultDimensionSpec( new DefaultDimensionSpec(
QueryRunnerTestHelper.providerDimension, QueryRunnerTestHelper.marketDimension,
"ProviderAlias" "MarketAlias"
) )
) )
) )
@ -752,7 +752,7 @@ public class GroupByQueryRunnerTest
new DefaultLimitSpec( new DefaultLimitSpec(
Lists.newArrayList( Lists.newArrayList(
new OrderByColumnSpec( new OrderByColumnSpec(
"providerALIAS", "marketALIAS",
OrderByColumnSpec.Direction.DESCENDING OrderByColumnSpec.Direction.DESCENDING
) )
), 3 ), 3
@ -766,9 +766,9 @@ public class GroupByQueryRunnerTest
.build(); .build();
List<Row> expectedResults = Arrays.asList( List<Row> expectedResults = Arrays.asList(
GroupByQueryRunnerTestHelper.createExpectedRow("1970-01-01T00:00:00.000Z", "provideralias", "upfront", "rows", 186L), GroupByQueryRunnerTestHelper.createExpectedRow("1970-01-01T00:00:00.000Z", "marketalias", "upfront", "rows", 186L),
GroupByQueryRunnerTestHelper.createExpectedRow("1970-01-01T00:00:00.000Z", "provideralias", "total_market", "rows", 186L), GroupByQueryRunnerTestHelper.createExpectedRow("1970-01-01T00:00:00.000Z", "marketalias", "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", "spot", "rows", 837L)
); );
Iterable<Row> results = GroupByQueryRunnerTestHelper.runQuery(factory, runner, query); Iterable<Row> results = GroupByQueryRunnerTestHelper.runQuery(factory, runner, query);
@ -1333,14 +1333,14 @@ public class GroupByQueryRunnerTest
.setDataSource(QueryRunnerTestHelper.dataSource) .setDataSource(QueryRunnerTestHelper.dataSource)
.setQuerySegmentSpec(QueryRunnerTestHelper.firstToThird) .setQuerySegmentSpec(QueryRunnerTestHelper.firstToThird)
.setDimensions(Lists.<DimensionSpec>newArrayList(new DefaultDimensionSpec("quality", "alias"))) .setDimensions(Lists.<DimensionSpec>newArrayList(new DefaultDimensionSpec("quality", "alias")))
.setDimFilter(new JavaScriptDimFilter("provider", "function(dim){ return true; }")) .setDimFilter(new JavaScriptDimFilter("market", "function(dim){ return true; }"))
.setAggregatorSpecs( .setAggregatorSpecs(
Arrays.asList( Arrays.asList(
QueryRunnerTestHelper.rowsCount, QueryRunnerTestHelper.rowsCount,
new DoubleSumAggregatorFactory("idx_subagg", "index"), new DoubleSumAggregatorFactory("idx_subagg", "index"),
new JavaScriptAggregatorFactory( new JavaScriptAggregatorFactory(
"js_agg", "js_agg",
Arrays.asList("index", "provider"), Arrays.asList("index", "market"),
"function(current, index, dim){return current + index + dim.length;}", "function(current, index, dim){return current + index + dim.length;}",
"function(){return 0;}", "function(){return 0;}",
"function(a,b){return a + b;}" "function(a,b){return a + b;}"

View File

@ -87,7 +87,7 @@ public class SearchQueryRunnerTest
QueryRunnerTestHelper.qualityDimension, QueryRunnerTestHelper.qualityDimension,
Sets.newHashSet("automotive", "mezzanine", "travel", "health", "entertainment") 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")); expectedResults.put(QueryRunnerTestHelper.placementishDimension, Sets.newHashSet("a"));
checkSearchQuery(searchQuery, expectedResults); checkSearchQuery(searchQuery, expectedResults);
@ -137,13 +137,13 @@ public class SearchQueryRunnerTest
public void testSearchWithDimensionProvider() public void testSearchWithDimensionProvider()
{ {
Map<String, Set<String>> expectedResults = Maps.newTreeMap(String.CASE_INSENSITIVE_ORDER); Map<String, Set<String>> expectedResults = Maps.newTreeMap(String.CASE_INSENSITIVE_ORDER);
expectedResults.put(QueryRunnerTestHelper.providerDimension, new HashSet<String>(Arrays.asList("total_market"))); expectedResults.put(QueryRunnerTestHelper.marketDimension, new HashSet<String>(Arrays.asList("total_market")));
checkSearchQuery( checkSearchQuery(
Druids.newSearchQueryBuilder() Druids.newSearchQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.dimensions("provider") .dimensions("market")
.intervals(QueryRunnerTestHelper.fullOnInterval) .intervals(QueryRunnerTestHelper.fullOnInterval)
.query("a") .query("a")
.build(), .build(),
@ -163,7 +163,7 @@ public class SearchQueryRunnerTest
"automotive", "mezzanine", "travel", "health", "entertainment" "automotive", "mezzanine", "travel", "health", "entertainment"
) )
), ),
QueryRunnerTestHelper.providerDimension, QueryRunnerTestHelper.marketDimension,
new HashSet<String>( new HashSet<String>(
Arrays.asList("total_market") Arrays.asList("total_market")
) )
@ -177,7 +177,7 @@ public class SearchQueryRunnerTest
.dimensions( .dimensions(
Arrays.asList( Arrays.asList(
QueryRunnerTestHelper.qualityDimension, QueryRunnerTestHelper.qualityDimension,
QueryRunnerTestHelper.providerDimension QueryRunnerTestHelper.marketDimension
) )
) )
.intervals(QueryRunnerTestHelper.fullOnInterval) .intervals(QueryRunnerTestHelper.fullOnInterval)
@ -191,7 +191,7 @@ public class SearchQueryRunnerTest
public void testSearchWithDimensionsPlacementAndProvider() public void testSearchWithDimensionsPlacementAndProvider()
{ {
Map<String, Set<String>> expectedResults = Maps.newTreeMap(String.CASE_INSENSITIVE_ORDER); Map<String, Set<String>> expectedResults = Maps.newTreeMap(String.CASE_INSENSITIVE_ORDER);
expectedResults.put(QueryRunnerTestHelper.providerDimension, new HashSet<String>(Arrays.asList("total_market"))); expectedResults.put(QueryRunnerTestHelper.marketDimension, new HashSet<String>(Arrays.asList("total_market")));
checkSearchQuery( checkSearchQuery(
Druids.newSearchQueryBuilder() Druids.newSearchQueryBuilder()
@ -200,7 +200,7 @@ public class SearchQueryRunnerTest
.dimensions( .dimensions(
Arrays.asList( Arrays.asList(
QueryRunnerTestHelper.placementishDimension, QueryRunnerTestHelper.placementishDimension,
QueryRunnerTestHelper.providerDimension QueryRunnerTestHelper.marketDimension
) )
) )
.intervals(QueryRunnerTestHelper.fullOnInterval) .intervals(QueryRunnerTestHelper.fullOnInterval)
@ -235,15 +235,15 @@ public class SearchQueryRunnerTest
public void testSearchWithSingleFilter2() public void testSearchWithSingleFilter2()
{ {
Map<String, Set<String>> expectedResults = Maps.newTreeMap(String.CASE_INSENSITIVE_ORDER); Map<String, Set<String>> expectedResults = Maps.newTreeMap(String.CASE_INSENSITIVE_ORDER);
expectedResults.put(QueryRunnerTestHelper.providerDimension, new HashSet<String>(Arrays.asList("total_market"))); expectedResults.put(QueryRunnerTestHelper.marketDimension, new HashSet<String>(Arrays.asList("total_market")));
checkSearchQuery( checkSearchQuery(
Druids.newSearchQueryBuilder() Druids.newSearchQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.filters(QueryRunnerTestHelper.providerDimension, "total_market") .filters(QueryRunnerTestHelper.marketDimension, "total_market")
.intervals(QueryRunnerTestHelper.fullOnInterval) .intervals(QueryRunnerTestHelper.fullOnInterval)
.dimensions(QueryRunnerTestHelper.providerDimension) .dimensions(QueryRunnerTestHelper.marketDimension)
.query("a") .query("a")
.build(), .build(),
expectedResults expectedResults
@ -260,7 +260,7 @@ public class SearchQueryRunnerTest
.fields( .fields(
Arrays.<DimFilter>asList( Arrays.<DimFilter>asList(
Druids.newSelectorDimFilterBuilder() Druids.newSelectorDimFilterBuilder()
.dimension(QueryRunnerTestHelper.providerDimension) .dimension(QueryRunnerTestHelper.marketDimension)
.value("spot") .value("spot")
.build(), .build(),
Druids.newSelectorDimFilterBuilder() Druids.newSelectorDimFilterBuilder()
@ -343,7 +343,7 @@ public class SearchQueryRunnerTest
.fields( .fields(
Arrays.<DimFilter>asList( Arrays.<DimFilter>asList(
Druids.newSelectorDimFilterBuilder() Druids.newSelectorDimFilterBuilder()
.dimension(QueryRunnerTestHelper.providerDimension) .dimension(QueryRunnerTestHelper.marketDimension)
.value("total_market") .value("total_market")
.build(), .build(),
Druids.newSelectorDimFilterBuilder() Druids.newSelectorDimFilterBuilder()

View File

@ -65,7 +65,7 @@ public class SelectQueryRunnerTest
); );
} }
private static final String providerLowercase = "provider"; private static final String providerLowercase = "market";
private final QueryRunner runner; private final QueryRunner runner;
@ -271,7 +271,7 @@ public class SelectQueryRunnerTest
SelectQuery query = new SelectQuery( SelectQuery query = new SelectQuery(
new TableDataSource(QueryRunnerTestHelper.dataSource), new TableDataSource(QueryRunnerTestHelper.dataSource),
new LegacySegmentSpec(new Interval("2011-01-12/2011-01-14")), new LegacySegmentSpec(new Interval("2011-01-12/2011-01-14")),
new SelectorDimFilter(QueryRunnerTestHelper.providerDimension, "spot"), new SelectorDimFilter(QueryRunnerTestHelper.marketDimension, "spot"),
QueryRunnerTestHelper.dayGran, QueryRunnerTestHelper.dayGran,
Lists.<String>newArrayList(QueryRunnerTestHelper.qualityDimension), Lists.<String>newArrayList(QueryRunnerTestHelper.qualityDimension),
Lists.<String>newArrayList(QueryRunnerTestHelper.indexMetric), Lists.<String>newArrayList(QueryRunnerTestHelper.indexMetric),
@ -368,8 +368,8 @@ public class SelectQueryRunnerTest
new LegacySegmentSpec(new Interval("2011-01-12/2011-01-14")), new LegacySegmentSpec(new Interval("2011-01-12/2011-01-14")),
new AndDimFilter( new AndDimFilter(
Arrays.<DimFilter>asList( Arrays.<DimFilter>asList(
new SelectorDimFilter(QueryRunnerTestHelper.providerDimension, "spot"), new SelectorDimFilter(QueryRunnerTestHelper.marketDimension, "spot"),
new SelectorDimFilter(QueryRunnerTestHelper.providerDimension, "foo") new SelectorDimFilter(QueryRunnerTestHelper.marketDimension, "foo")
) )
), ),
QueryRunnerTestHelper.allGran, QueryRunnerTestHelper.allGran,

View File

@ -87,7 +87,7 @@ public class TimeseriesQueryRunnerTest
QueryGranularity gran = QueryGranularity.DAY; QueryGranularity gran = QueryGranularity.DAY;
TimeseriesQuery query = Druids.newTimeseriesQueryBuilder() TimeseriesQuery query = Druids.newTimeseriesQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.dayGran) .granularity(gran)
.intervals(QueryRunnerTestHelper.fullOnInterval) .intervals(QueryRunnerTestHelper.fullOnInterval)
.aggregators( .aggregators(
Arrays.asList( Arrays.asList(
@ -193,7 +193,7 @@ public class TimeseriesQueryRunnerTest
TimeseriesQuery query = Druids.newTimeseriesQueryBuilder() TimeseriesQuery query = Druids.newTimeseriesQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.dayGran) .granularity(QueryRunnerTestHelper.dayGran)
.filters(QueryRunnerTestHelper.providerDimension, "upfront") .filters(QueryRunnerTestHelper.marketDimension, "upfront")
.intervals(QueryRunnerTestHelper.fullOnInterval) .intervals(QueryRunnerTestHelper.fullOnInterval)
.aggregators( .aggregators(
Arrays.<AggregatorFactory>asList( Arrays.<AggregatorFactory>asList(
@ -205,7 +205,7 @@ public class TimeseriesQueryRunnerTest
Assert.assertEquals( Assert.assertEquals(
Druids.newSelectorDimFilterBuilder() Druids.newSelectorDimFilterBuilder()
.dimension(QueryRunnerTestHelper.providerDimension) .dimension(QueryRunnerTestHelper.marketDimension)
.value("upfront") .value("upfront")
.build(), .build(),
query.getDimensionsFilter() query.getDimensionsFilter()
@ -418,7 +418,7 @@ public class TimeseriesQueryRunnerTest
{ {
TimeseriesQuery query1 = Druids.newTimeseriesQueryBuilder() TimeseriesQuery query1 = Druids.newTimeseriesQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.filters(QueryRunnerTestHelper.providerDimension, "spot", "upfront", "total_market") .filters(QueryRunnerTestHelper.marketDimension, "spot", "upfront", "total_market")
.granularity( .granularity(
new PeriodGranularity( new PeriodGranularity(
new Period("P7D"), new Period("P7D"),
@ -471,7 +471,7 @@ public class TimeseriesQueryRunnerTest
{ {
TimeseriesQuery query1 = Druids.newTimeseriesQueryBuilder() TimeseriesQuery query1 = Druids.newTimeseriesQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.filters(QueryRunnerTestHelper.providerDimension, "spot", "upfront", "total_market") .filters(QueryRunnerTestHelper.marketDimension, "spot", "upfront", "total_market")
.granularity(QueryGranularity.HOUR) .granularity(QueryGranularity.HOUR)
.intervals( .intervals(
Arrays.asList( Arrays.asList(
@ -539,7 +539,7 @@ public class TimeseriesQueryRunnerTest
{ {
TimeseriesQuery query1 = Druids.newTimeseriesQueryBuilder() TimeseriesQuery query1 = Druids.newTimeseriesQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.filters(QueryRunnerTestHelper.providerDimension, "spot", "upfront", "total_market") .filters(QueryRunnerTestHelper.marketDimension, "spot", "upfront", "total_market")
.granularity( .granularity(
new PeriodGranularity( new PeriodGranularity(
new Period("PT1H"), new Period("PT1H"),
@ -586,7 +586,7 @@ public class TimeseriesQueryRunnerTest
{ {
TimeseriesQuery query1 = Druids.newTimeseriesQueryBuilder() TimeseriesQuery query1 = Druids.newTimeseriesQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .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)) .granularity(new PeriodGranularity(new Period("P1M"), null, null))
.intervals( .intervals(
Arrays.asList( Arrays.asList(
@ -624,7 +624,7 @@ public class TimeseriesQueryRunnerTest
TimeseriesQuery query2 = Druids.newTimeseriesQueryBuilder() TimeseriesQuery query2 = Druids.newTimeseriesQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.filters(QueryRunnerTestHelper.providerDimension, "spot", "upfront", "total_market") .filters(QueryRunnerTestHelper.marketDimension, "spot", "upfront", "total_market")
.granularity("DAY") .granularity("DAY")
.intervals( .intervals(
Arrays.asList( Arrays.asList(
@ -702,7 +702,7 @@ public class TimeseriesQueryRunnerTest
TimeseriesQuery query = Druids.newTimeseriesQueryBuilder() TimeseriesQuery query = Druids.newTimeseriesQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.dayGran) .granularity(QueryRunnerTestHelper.dayGran)
.filters(QueryRunnerTestHelper.providerDimension, "spot", "upfront", "total_market") .filters(QueryRunnerTestHelper.marketDimension, "spot", "upfront", "total_market")
.intervals(QueryRunnerTestHelper.firstToThird) .intervals(QueryRunnerTestHelper.firstToThird)
.aggregators( .aggregators(
Arrays.<AggregatorFactory>asList( Arrays.<AggregatorFactory>asList(
@ -752,7 +752,7 @@ public class TimeseriesQueryRunnerTest
TimeseriesQuery query = Druids.newTimeseriesQueryBuilder() TimeseriesQuery query = Druids.newTimeseriesQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.dayGran) .granularity(QueryRunnerTestHelper.dayGran)
.filters(new RegexDimFilter(QueryRunnerTestHelper.providerDimension, "^.p.*$")) // spot and upfront .filters(new RegexDimFilter(QueryRunnerTestHelper.marketDimension, "^.p.*$")) // spot and upfront
.intervals(QueryRunnerTestHelper.firstToThird) .intervals(QueryRunnerTestHelper.firstToThird)
.aggregators( .aggregators(
Arrays.<AggregatorFactory>asList( Arrays.<AggregatorFactory>asList(
@ -802,7 +802,7 @@ public class TimeseriesQueryRunnerTest
TimeseriesQuery query = Druids.newTimeseriesQueryBuilder() TimeseriesQuery query = Druids.newTimeseriesQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.dayGran) .granularity(QueryRunnerTestHelper.dayGran)
.filters(QueryRunnerTestHelper.providerDimension, "spot") .filters(QueryRunnerTestHelper.marketDimension, "spot")
.intervals(QueryRunnerTestHelper.firstToThird) .intervals(QueryRunnerTestHelper.firstToThird)
.aggregators( .aggregators(
Arrays.<AggregatorFactory>asList( Arrays.<AggregatorFactory>asList(
@ -852,7 +852,7 @@ public class TimeseriesQueryRunnerTest
TimeseriesQuery query = Druids.newTimeseriesQueryBuilder() TimeseriesQuery query = Druids.newTimeseriesQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.dayGran) .granularity(QueryRunnerTestHelper.dayGran)
.filters(QueryRunnerTestHelper.providerDimension, "upfront") .filters(QueryRunnerTestHelper.marketDimension, "upfront")
.intervals(QueryRunnerTestHelper.firstToThird) .intervals(QueryRunnerTestHelper.firstToThird)
.aggregators( .aggregators(
Arrays.<AggregatorFactory>asList( Arrays.<AggregatorFactory>asList(
@ -902,7 +902,7 @@ public class TimeseriesQueryRunnerTest
TimeseriesQuery query = Druids.newTimeseriesQueryBuilder() TimeseriesQuery query = Druids.newTimeseriesQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.dayGran) .granularity(QueryRunnerTestHelper.dayGran)
.filters(QueryRunnerTestHelper.providerDimension, "total_market") .filters(QueryRunnerTestHelper.marketDimension, "total_market")
.intervals(QueryRunnerTestHelper.firstToThird) .intervals(QueryRunnerTestHelper.firstToThird)
.aggregators( .aggregators(
Arrays.<AggregatorFactory>asList( Arrays.<AggregatorFactory>asList(
@ -954,7 +954,7 @@ public class TimeseriesQueryRunnerTest
.fields( .fields(
Arrays.<DimFilter>asList( Arrays.<DimFilter>asList(
Druids.newSelectorDimFilterBuilder() Druids.newSelectorDimFilterBuilder()
.dimension(QueryRunnerTestHelper.providerDimension) .dimension(QueryRunnerTestHelper.marketDimension)
.value("spot") .value("spot")
.build(), .build(),
Druids.newOrDimFilterBuilder() Druids.newOrDimFilterBuilder()
@ -1011,7 +1011,7 @@ public class TimeseriesQueryRunnerTest
.fields( .fields(
Arrays.<DimFilter>asList( Arrays.<DimFilter>asList(
Druids.newSelectorDimFilterBuilder() Druids.newSelectorDimFilterBuilder()
.dimension(QueryRunnerTestHelper.providerDimension) .dimension(QueryRunnerTestHelper.marketDimension)
.value("spot") .value("spot")
.build(), .build(),
Druids.newSelectorDimFilterBuilder() Druids.newSelectorDimFilterBuilder()
@ -1069,7 +1069,7 @@ public class TimeseriesQueryRunnerTest
.fields( .fields(
Arrays.<DimFilter>asList( Arrays.<DimFilter>asList(
Druids.newSelectorDimFilterBuilder() Druids.newSelectorDimFilterBuilder()
.dimension(QueryRunnerTestHelper.providerDimension) .dimension(QueryRunnerTestHelper.marketDimension)
.value("spot") .value("spot")
.build(), .build(),
Druids.newSelectorDimFilterBuilder() Druids.newSelectorDimFilterBuilder()
@ -1127,7 +1127,7 @@ public class TimeseriesQueryRunnerTest
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.dayGran) .granularity(QueryRunnerTestHelper.dayGran)
.filters( .filters(
QueryRunnerTestHelper.providerDimension, QueryRunnerTestHelper.marketDimension,
"spot", "spot",
"upfront", "upfront",
"total_market", "total_market",
@ -1183,7 +1183,7 @@ public class TimeseriesQueryRunnerTest
.fields( .fields(
Arrays.<DimFilter>asList( Arrays.<DimFilter>asList(
Druids.newSelectorDimFilterBuilder() Druids.newSelectorDimFilterBuilder()
.dimension(QueryRunnerTestHelper.providerDimension) .dimension(QueryRunnerTestHelper.marketDimension)
.value("spot") .value("spot")
.build(), .build(),
Druids.newOrDimFilterBuilder() Druids.newOrDimFilterBuilder()
@ -1288,7 +1288,7 @@ public class TimeseriesQueryRunnerTest
TimeseriesQuery query = Druids.newTimeseriesQueryBuilder() TimeseriesQuery query = Druids.newTimeseriesQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.dayGran) .granularity(QueryRunnerTestHelper.dayGran)
.filters(QueryRunnerTestHelper.providerDimension, "billy") .filters(QueryRunnerTestHelper.marketDimension, "billy")
.intervals(QueryRunnerTestHelper.firstToThird) .intervals(QueryRunnerTestHelper.firstToThird)
.aggregators(QueryRunnerTestHelper.commonAggregators) .aggregators(QueryRunnerTestHelper.commonAggregators)
.postAggregators(Arrays.<PostAggregator>asList(QueryRunnerTestHelper.addRowsIndexConstant)) .postAggregators(Arrays.<PostAggregator>asList(QueryRunnerTestHelper.addRowsIndexConstant))
@ -1333,7 +1333,7 @@ public class TimeseriesQueryRunnerTest
.fields( .fields(
Arrays.<DimFilter>asList( Arrays.<DimFilter>asList(
Druids.newSelectorDimFilterBuilder() Druids.newSelectorDimFilterBuilder()
.dimension(QueryRunnerTestHelper.providerDimension) .dimension(QueryRunnerTestHelper.marketDimension)
.value("billy") .value("billy")
.build(), .build(),
Druids.newSelectorDimFilterBuilder() Druids.newSelectorDimFilterBuilder()
@ -1533,7 +1533,7 @@ public class TimeseriesQueryRunnerTest
.fields( .fields(
Arrays.<DimFilter>asList( Arrays.<DimFilter>asList(
Druids.newSelectorDimFilterBuilder() Druids.newSelectorDimFilterBuilder()
.dimension(QueryRunnerTestHelper.providerDimension) .dimension(QueryRunnerTestHelper.marketDimension)
.value("spot") .value("spot")
.build(), .build(),
Druids.newSelectorDimFilterBuilder() Druids.newSelectorDimFilterBuilder()
@ -1556,7 +1556,7 @@ public class TimeseriesQueryRunnerTest
.fields( .fields(
Arrays.<DimFilter>asList( Arrays.<DimFilter>asList(
Druids.newSelectorDimFilterBuilder() Druids.newSelectorDimFilterBuilder()
.dimension(QueryRunnerTestHelper.providerDimension) .dimension(QueryRunnerTestHelper.marketDimension)
.value("spot") .value("spot")
.build(), .build(),
Druids.newSelectorDimFilterBuilder() Druids.newSelectorDimFilterBuilder()
@ -1594,7 +1594,7 @@ public class TimeseriesQueryRunnerTest
.fields( .fields(
Arrays.<DimFilter>asList( Arrays.<DimFilter>asList(
Druids.newSelectorDimFilterBuilder() Druids.newSelectorDimFilterBuilder()
.dimension(QueryRunnerTestHelper.providerDimension) .dimension(QueryRunnerTestHelper.marketDimension)
.value("spot") .value("spot")
.build(), .build(),
Druids.newOrDimFilterBuilder() Druids.newOrDimFilterBuilder()
@ -1616,7 +1616,7 @@ public class TimeseriesQueryRunnerTest
.fields( .fields(
Arrays.<DimFilter>asList( Arrays.<DimFilter>asList(
Druids.newSelectorDimFilterBuilder() Druids.newSelectorDimFilterBuilder()
.dimension(QueryRunnerTestHelper.providerDimension) .dimension(QueryRunnerTestHelper.marketDimension)
.value("spot") .value("spot")
.build(), .build(),
Druids.newOrDimFilterBuilder() Druids.newOrDimFilterBuilder()

View File

@ -104,7 +104,7 @@ public class TopNQueryRunnerTest
this.runner = runner; this.runner = runner;
} }
private static final String providerDimension = "provider"; private static final String marketDimension = "market";
@Test @Test
public void testFullOnTopN() public void testFullOnTopN()
@ -112,7 +112,7 @@ public class TopNQueryRunnerTest
TopNQuery query = new TopNQueryBuilder() TopNQuery query = new TopNQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.dimension(providerDimension) .dimension(marketDimension)
.metric(QueryRunnerTestHelper.indexMetric) .metric(QueryRunnerTestHelper.indexMetric)
.threshold(4) .threshold(4)
.intervals(QueryRunnerTestHelper.fullOnInterval) .intervals(QueryRunnerTestHelper.fullOnInterval)
@ -136,7 +136,7 @@ public class TopNQueryRunnerTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put(providerDimension, "total_market") .put(marketDimension, "total_market")
.put("rows", 186L) .put("rows", 186L)
.put("index", 215679.82879638672D) .put("index", 215679.82879638672D)
.put("addRowsIndexConstant", 215866.82879638672D) .put("addRowsIndexConstant", 215866.82879638672D)
@ -145,7 +145,7 @@ public class TopNQueryRunnerTest
.put("minIndex", 792.3260498046875D) .put("minIndex", 792.3260498046875D)
.build(), .build(),
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put(providerDimension, "upfront") .put(marketDimension, "upfront")
.put("rows", 186L) .put("rows", 186L)
.put("index", 192046.1060180664D) .put("index", 192046.1060180664D)
.put("addRowsIndexConstant", 192233.1060180664D) .put("addRowsIndexConstant", 192233.1060180664D)
@ -154,7 +154,7 @@ public class TopNQueryRunnerTest
.put("minIndex", 545.9906005859375D) .put("minIndex", 545.9906005859375D)
.build(), .build(),
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put(providerDimension, "spot") .put(marketDimension, "spot")
.put("rows", 837L) .put("rows", 837L)
.put("index", 95606.57232284546D) .put("index", 95606.57232284546D)
.put("addRowsIndexConstant", 96444.57232284546D) .put("addRowsIndexConstant", 96444.57232284546D)
@ -176,7 +176,7 @@ public class TopNQueryRunnerTest
TopNQuery query = new TopNQueryBuilder() TopNQuery query = new TopNQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.dimension(providerDimension) .dimension(marketDimension)
.metric(QueryRunnerTestHelper.addRowsIndexConstantMetric) .metric(QueryRunnerTestHelper.addRowsIndexConstantMetric)
.threshold(4) .threshold(4)
.intervals(QueryRunnerTestHelper.fullOnInterval) .intervals(QueryRunnerTestHelper.fullOnInterval)
@ -200,7 +200,7 @@ public class TopNQueryRunnerTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put(providerDimension, "total_market") .put(marketDimension, "total_market")
.put("rows", 186L) .put("rows", 186L)
.put("index", 215679.82879638672D) .put("index", 215679.82879638672D)
.put("addRowsIndexConstant", 215866.82879638672D) .put("addRowsIndexConstant", 215866.82879638672D)
@ -209,7 +209,7 @@ public class TopNQueryRunnerTest
.put("minIndex", 792.3260498046875D) .put("minIndex", 792.3260498046875D)
.build(), .build(),
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put(providerDimension, "upfront") .put(marketDimension, "upfront")
.put("rows", 186L) .put("rows", 186L)
.put("index", 192046.1060180664D) .put("index", 192046.1060180664D)
.put("addRowsIndexConstant", 192233.1060180664D) .put("addRowsIndexConstant", 192233.1060180664D)
@ -218,7 +218,7 @@ public class TopNQueryRunnerTest
.put("minIndex", 545.9906005859375D) .put("minIndex", 545.9906005859375D)
.build(), .build(),
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put(providerDimension, "spot") .put(marketDimension, "spot")
.put("rows", 837L) .put("rows", 837L)
.put("index", 95606.57232284546D) .put("index", 95606.57232284546D)
.put("addRowsIndexConstant", 96444.57232284546D) .put("addRowsIndexConstant", 96444.57232284546D)
@ -241,7 +241,7 @@ public class TopNQueryRunnerTest
TopNQuery query = new TopNQueryBuilder() TopNQuery query = new TopNQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.dimension(providerDimension) .dimension(marketDimension)
.metric(QueryRunnerTestHelper.uniqueMetric) .metric(QueryRunnerTestHelper.uniqueMetric)
.threshold(3) .threshold(3)
.intervals(QueryRunnerTestHelper.fullOnInterval) .intervals(QueryRunnerTestHelper.fullOnInterval)
@ -265,7 +265,7 @@ public class TopNQueryRunnerTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "spot") .put("market", "spot")
.put("rows", 837L) .put("rows", 837L)
.put("index", 95606.57232284546D) .put("index", 95606.57232284546D)
.put("addRowsIndexConstant", 96444.57232284546D) .put("addRowsIndexConstant", 96444.57232284546D)
@ -274,7 +274,7 @@ public class TopNQueryRunnerTest
.put("minIndex", 59.02102279663086D) .put("minIndex", 59.02102279663086D)
.build(), .build(),
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "total_market") .put("market", "total_market")
.put("rows", 186L) .put("rows", 186L)
.put("index", 215679.82879638672D) .put("index", 215679.82879638672D)
.put("addRowsIndexConstant", 215866.82879638672D) .put("addRowsIndexConstant", 215866.82879638672D)
@ -283,7 +283,7 @@ public class TopNQueryRunnerTest
.put("minIndex", 792.3260498046875D) .put("minIndex", 792.3260498046875D)
.build(), .build(),
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "upfront") .put("market", "upfront")
.put("rows", 186L) .put("rows", 186L)
.put("index", 192046.1060180664D) .put("index", 192046.1060180664D)
.put("addRowsIndexConstant", 192233.1060180664D) .put("addRowsIndexConstant", 192233.1060180664D)
@ -306,7 +306,7 @@ public class TopNQueryRunnerTest
TopNQuery query = new TopNQueryBuilder() TopNQuery query = new TopNQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.dimension(providerDimension) .dimension(marketDimension)
.metric(QueryRunnerTestHelper.indexMetric) .metric(QueryRunnerTestHelper.indexMetric)
.threshold(4) .threshold(4)
.intervals(QueryRunnerTestHelper.firstToThird) .intervals(QueryRunnerTestHelper.firstToThird)
@ -321,21 +321,21 @@ public class TopNQueryRunnerTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "total_market", marketDimension, "total_market",
"rows", 4L, "rows", 4L,
"index", 5351.814697265625D, "index", 5351.814697265625D,
"addRowsIndexConstant", 5356.814697265625D, "addRowsIndexConstant", 5356.814697265625D,
"uniques", QueryRunnerTestHelper.UNIQUES_2 "uniques", QueryRunnerTestHelper.UNIQUES_2
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "upfront", marketDimension, "upfront",
"rows", 4L, "rows", 4L,
"index", 4875.669677734375D, "index", 4875.669677734375D,
"addRowsIndexConstant", 4880.669677734375D, "addRowsIndexConstant", 4880.669677734375D,
"uniques", QueryRunnerTestHelper.UNIQUES_2 "uniques", QueryRunnerTestHelper.UNIQUES_2
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "spot", marketDimension, "spot",
"rows", 18L, "rows", 18L,
"index", 2231.8768157958984D, "index", 2231.8768157958984D,
"addRowsIndexConstant", 2250.8768157958984D, "addRowsIndexConstant", 2250.8768157958984D,
@ -355,7 +355,7 @@ public class TopNQueryRunnerTest
TopNQuery query = new TopNQueryBuilder() TopNQuery query = new TopNQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.dimension(providerDimension) .dimension(marketDimension)
.metric(new NumericTopNMetricSpec("uniques")) .metric(new NumericTopNMetricSpec("uniques"))
.threshold(4) .threshold(4)
.intervals(QueryRunnerTestHelper.firstToThird) .intervals(QueryRunnerTestHelper.firstToThird)
@ -370,21 +370,21 @@ public class TopNQueryRunnerTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
"provider", "spot", "market", "spot",
"rows", 18L, "rows", 18L,
"index", 2231.8768157958984D, "index", 2231.8768157958984D,
"addRowsIndexConstant", 2250.8768157958984D, "addRowsIndexConstant", 2250.8768157958984D,
"uniques", QueryRunnerTestHelper.UNIQUES_9 "uniques", QueryRunnerTestHelper.UNIQUES_9
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
"provider", "total_market", "market", "total_market",
"rows", 4L, "rows", 4L,
"index", 5351.814697265625D, "index", 5351.814697265625D,
"addRowsIndexConstant", 5356.814697265625D, "addRowsIndexConstant", 5356.814697265625D,
"uniques", QueryRunnerTestHelper.UNIQUES_2 "uniques", QueryRunnerTestHelper.UNIQUES_2
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
"provider", "upfront", "market", "upfront",
"rows", 4L, "rows", 4L,
"index", 4875.669677734375D, "index", 4875.669677734375D,
"addRowsIndexConstant", 4880.669677734375D, "addRowsIndexConstant", 4880.669677734375D,
@ -404,8 +404,8 @@ public class TopNQueryRunnerTest
TopNQuery query = new TopNQueryBuilder() TopNQuery query = new TopNQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.filters(providerDimension, "total_market", "upfront", "spot") .filters(marketDimension, "total_market", "upfront", "spot")
.dimension(providerDimension) .dimension(marketDimension)
.metric(QueryRunnerTestHelper.indexMetric) .metric(QueryRunnerTestHelper.indexMetric)
.threshold(4) .threshold(4)
.intervals(QueryRunnerTestHelper.firstToThird) .intervals(QueryRunnerTestHelper.firstToThird)
@ -419,21 +419,21 @@ public class TopNQueryRunnerTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "total_market", marketDimension, "total_market",
"rows", 4L, "rows", 4L,
"index", 5351.814697265625D, "index", 5351.814697265625D,
"addRowsIndexConstant", 5356.814697265625D, "addRowsIndexConstant", 5356.814697265625D,
"uniques", QueryRunnerTestHelper.UNIQUES_2 "uniques", QueryRunnerTestHelper.UNIQUES_2
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "upfront", marketDimension, "upfront",
"rows", 4L, "rows", 4L,
"index", 4875.669677734375D, "index", 4875.669677734375D,
"addRowsIndexConstant", 4880.669677734375D, "addRowsIndexConstant", 4880.669677734375D,
"uniques", QueryRunnerTestHelper.UNIQUES_2 "uniques", QueryRunnerTestHelper.UNIQUES_2
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "spot", marketDimension, "spot",
"rows", 18L, "rows", 18L,
"index", 2231.8768157958984D, "index", 2231.8768157958984D,
"addRowsIndexConstant", 2250.8768157958984D, "addRowsIndexConstant", 2250.8768157958984D,
@ -453,8 +453,8 @@ public class TopNQueryRunnerTest
TopNQuery query = new TopNQueryBuilder() TopNQuery query = new TopNQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.filters(providerDimension, "total_market", "upfront") .filters(marketDimension, "total_market", "upfront")
.dimension(providerDimension) .dimension(marketDimension)
.metric(QueryRunnerTestHelper.indexMetric) .metric(QueryRunnerTestHelper.indexMetric)
.threshold(4) .threshold(4)
.intervals(QueryRunnerTestHelper.firstToThird) .intervals(QueryRunnerTestHelper.firstToThird)
@ -468,14 +468,14 @@ public class TopNQueryRunnerTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "total_market", marketDimension, "total_market",
"rows", 4L, "rows", 4L,
"index", 5351.814697265625D, "index", 5351.814697265625D,
"addRowsIndexConstant", 5356.814697265625D, "addRowsIndexConstant", 5356.814697265625D,
"uniques", QueryRunnerTestHelper.UNIQUES_2 "uniques", QueryRunnerTestHelper.UNIQUES_2
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "upfront", marketDimension, "upfront",
"rows", 4L, "rows", 4L,
"index", 4875.669677734375D, "index", 4875.669677734375D,
"addRowsIndexConstant", 4880.669677734375D, "addRowsIndexConstant", 4880.669677734375D,
@ -495,8 +495,8 @@ public class TopNQueryRunnerTest
TopNQuery query = new TopNQueryBuilder() TopNQuery query = new TopNQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.filters(providerDimension, "upfront") .filters(marketDimension, "upfront")
.dimension(providerDimension) .dimension(marketDimension)
.metric(QueryRunnerTestHelper.indexMetric) .metric(QueryRunnerTestHelper.indexMetric)
.threshold(4) .threshold(4)
.intervals(QueryRunnerTestHelper.firstToThird) .intervals(QueryRunnerTestHelper.firstToThird)
@ -510,7 +510,7 @@ public class TopNQueryRunnerTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "upfront", marketDimension, "upfront",
"rows", 4L, "rows", 4L,
"index", 4875.669677734375D, "index", 4875.669677734375D,
"addRowsIndexConstant", 4880.669677734375D, "addRowsIndexConstant", 4880.669677734375D,
@ -531,7 +531,7 @@ public class TopNQueryRunnerTest
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.filters(QueryRunnerTestHelper.qualityDimension, "mezzanine") .filters(QueryRunnerTestHelper.qualityDimension, "mezzanine")
.dimension(providerDimension) .dimension(marketDimension)
.metric(QueryRunnerTestHelper.indexMetric) .metric(QueryRunnerTestHelper.indexMetric)
.threshold(4) .threshold(4)
.intervals(QueryRunnerTestHelper.firstToThird) .intervals(QueryRunnerTestHelper.firstToThird)
@ -545,21 +545,21 @@ public class TopNQueryRunnerTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "upfront", marketDimension, "upfront",
"rows", 2L, "rows", 2L,
"index", 2591.68359375D, "index", 2591.68359375D,
"addRowsIndexConstant", 2594.68359375D, "addRowsIndexConstant", 2594.68359375D,
"uniques", QueryRunnerTestHelper.UNIQUES_1 "uniques", QueryRunnerTestHelper.UNIQUES_1
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "total_market", marketDimension, "total_market",
"rows", 2L, "rows", 2L,
"index", 2508.39599609375D, "index", 2508.39599609375D,
"addRowsIndexConstant", 2511.39599609375D, "addRowsIndexConstant", 2511.39599609375D,
"uniques", QueryRunnerTestHelper.UNIQUES_1 "uniques", QueryRunnerTestHelper.UNIQUES_1
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "spot", marketDimension, "spot",
"rows", 2L, "rows", 2L,
"index", 220.63774871826172D, "index", 220.63774871826172D,
"addRowsIndexConstant", 223.63774871826172D, "addRowsIndexConstant", 223.63774871826172D,
@ -580,7 +580,7 @@ public class TopNQueryRunnerTest
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.filters(QueryRunnerTestHelper.qualityDimension, "mezzanine") .filters(QueryRunnerTestHelper.qualityDimension, "mezzanine")
.dimension(providerDimension) .dimension(marketDimension)
.metric(QueryRunnerTestHelper.indexMetric) .metric(QueryRunnerTestHelper.indexMetric)
.threshold(4) .threshold(4)
.intervals( .intervals(
@ -598,21 +598,21 @@ public class TopNQueryRunnerTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "upfront", marketDimension, "upfront",
"rows", 1L, "rows", 1L,
"index", new Float(1447.341160).doubleValue(), "index", new Float(1447.341160).doubleValue(),
"addRowsIndexConstant", new Float(1449.341160).doubleValue(), "addRowsIndexConstant", new Float(1449.341160).doubleValue(),
"uniques", QueryRunnerTestHelper.UNIQUES_1 "uniques", QueryRunnerTestHelper.UNIQUES_1
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "total_market", marketDimension, "total_market",
"rows", 1L, "rows", 1L,
"index", new Float(1314.839715).doubleValue(), "index", new Float(1314.839715).doubleValue(),
"addRowsIndexConstant", new Float(1316.839715).doubleValue(), "addRowsIndexConstant", new Float(1316.839715).doubleValue(),
"uniques", QueryRunnerTestHelper.UNIQUES_1 "uniques", QueryRunnerTestHelper.UNIQUES_1
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "spot", marketDimension, "spot",
"rows", 1L, "rows", 1L,
"index", new Float(109.705815).doubleValue(), "index", new Float(109.705815).doubleValue(),
"addRowsIndexConstant", new Float(111.705815).doubleValue(), "addRowsIndexConstant", new Float(111.705815).doubleValue(),
@ -632,8 +632,8 @@ public class TopNQueryRunnerTest
TopNQuery query = new TopNQueryBuilder() TopNQuery query = new TopNQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.filters(providerDimension, "total_market", "upfront", "billyblank") .filters(marketDimension, "total_market", "upfront", "billyblank")
.dimension(providerDimension) .dimension(marketDimension)
.metric(QueryRunnerTestHelper.indexMetric) .metric(QueryRunnerTestHelper.indexMetric)
.threshold(4) .threshold(4)
.intervals(QueryRunnerTestHelper.firstToThird) .intervals(QueryRunnerTestHelper.firstToThird)
@ -647,14 +647,14 @@ public class TopNQueryRunnerTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "total_market", marketDimension, "total_market",
"rows", 4L, "rows", 4L,
"index", 5351.814697265625D, "index", 5351.814697265625D,
"addRowsIndexConstant", 5356.814697265625D, "addRowsIndexConstant", 5356.814697265625D,
"uniques", QueryRunnerTestHelper.UNIQUES_2 "uniques", QueryRunnerTestHelper.UNIQUES_2
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "upfront", marketDimension, "upfront",
"rows", 4L, "rows", 4L,
"index", 4875.669677734375D, "index", 4875.669677734375D,
"addRowsIndexConstant", 4880.669677734375D, "addRowsIndexConstant", 4880.669677734375D,
@ -674,8 +674,8 @@ public class TopNQueryRunnerTest
TopNQuery query = new TopNQueryBuilder() TopNQuery query = new TopNQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.filters(providerDimension, "billyblank") .filters(marketDimension, "billyblank")
.dimension(providerDimension) .dimension(marketDimension)
.metric(QueryRunnerTestHelper.indexMetric) .metric(QueryRunnerTestHelper.indexMetric)
.threshold(4) .threshold(4)
.intervals(QueryRunnerTestHelper.firstToThird) .intervals(QueryRunnerTestHelper.firstToThird)
@ -701,7 +701,7 @@ public class TopNQueryRunnerTest
.fields( .fields(
Lists.<DimFilter>newArrayList( Lists.<DimFilter>newArrayList(
Druids.newSelectorDimFilterBuilder() Druids.newSelectorDimFilterBuilder()
.dimension(providerDimension) .dimension(marketDimension)
.value("billyblank") .value("billyblank")
.build(), .build(),
Druids.newSelectorDimFilterBuilder() Druids.newSelectorDimFilterBuilder()
@ -714,7 +714,7 @@ public class TopNQueryRunnerTest
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.filters(andDimFilter) .filters(andDimFilter)
.dimension(providerDimension) .dimension(marketDimension)
.metric(QueryRunnerTestHelper.indexMetric) .metric(QueryRunnerTestHelper.indexMetric)
.threshold(4) .threshold(4)
.intervals(QueryRunnerTestHelper.firstToThird) .intervals(QueryRunnerTestHelper.firstToThird)
@ -740,7 +740,7 @@ public class TopNQueryRunnerTest
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.filters(QueryRunnerTestHelper.placementishDimension, "m") .filters(QueryRunnerTestHelper.placementishDimension, "m")
.dimension(providerDimension) .dimension(marketDimension)
.metric(QueryRunnerTestHelper.indexMetric) .metric(QueryRunnerTestHelper.indexMetric)
.threshold(4) .threshold(4)
.intervals(QueryRunnerTestHelper.firstToThird) .intervals(QueryRunnerTestHelper.firstToThird)
@ -755,7 +755,7 @@ public class TopNQueryRunnerTest
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.filters(QueryRunnerTestHelper.qualityDimension, "mezzanine") .filters(QueryRunnerTestHelper.qualityDimension, "mezzanine")
.dimension(providerDimension) .dimension(marketDimension)
.metric(QueryRunnerTestHelper.indexMetric) .metric(QueryRunnerTestHelper.indexMetric)
.threshold(4) .threshold(4)
.intervals(QueryRunnerTestHelper.firstToThird) .intervals(QueryRunnerTestHelper.firstToThird)
@ -955,7 +955,7 @@ public class TopNQueryRunnerTest
TopNQuery query = new TopNQueryBuilder() TopNQuery query = new TopNQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.dimension(providerDimension) .dimension(marketDimension)
.metric(new LexicographicTopNMetricSpec("")) .metric(new LexicographicTopNMetricSpec(""))
.threshold(4) .threshold(4)
.intervals(QueryRunnerTestHelper.firstToThird) .intervals(QueryRunnerTestHelper.firstToThird)
@ -969,21 +969,21 @@ public class TopNQueryRunnerTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "spot", marketDimension, "spot",
"rows", 18L, "rows", 18L,
"index", 2231.8768157958984D, "index", 2231.8768157958984D,
"addRowsIndexConstant", 2250.8768157958984D, "addRowsIndexConstant", 2250.8768157958984D,
"uniques", QueryRunnerTestHelper.UNIQUES_9 "uniques", QueryRunnerTestHelper.UNIQUES_9
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "total_market", marketDimension, "total_market",
"rows", 4L, "rows", 4L,
"index", 5351.814697265625D, "index", 5351.814697265625D,
"addRowsIndexConstant", 5356.814697265625D, "addRowsIndexConstant", 5356.814697265625D,
"uniques", QueryRunnerTestHelper.UNIQUES_2 "uniques", QueryRunnerTestHelper.UNIQUES_2
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "upfront", marketDimension, "upfront",
"rows", 4L, "rows", 4L,
"index", 4875.669677734375D, "index", 4875.669677734375D,
"addRowsIndexConstant", 4880.669677734375D, "addRowsIndexConstant", 4880.669677734375D,
@ -1003,7 +1003,7 @@ public class TopNQueryRunnerTest
TopNQuery query = new TopNQueryBuilder() TopNQuery query = new TopNQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.dimension(providerDimension) .dimension(marketDimension)
.metric(new LexicographicTopNMetricSpec("spot")) .metric(new LexicographicTopNMetricSpec("spot"))
.threshold(4) .threshold(4)
.intervals(QueryRunnerTestHelper.firstToThird) .intervals(QueryRunnerTestHelper.firstToThird)
@ -1017,14 +1017,14 @@ public class TopNQueryRunnerTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "total_market", marketDimension, "total_market",
"rows", 4L, "rows", 4L,
"index", 5351.814697265625D, "index", 5351.814697265625D,
"addRowsIndexConstant", 5356.814697265625D, "addRowsIndexConstant", 5356.814697265625D,
"uniques", QueryRunnerTestHelper.UNIQUES_2 "uniques", QueryRunnerTestHelper.UNIQUES_2
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "upfront", marketDimension, "upfront",
"rows", 4L, "rows", 4L,
"index", 4875.669677734375D, "index", 4875.669677734375D,
"addRowsIndexConstant", 4880.669677734375D, "addRowsIndexConstant", 4880.669677734375D,
@ -1044,7 +1044,7 @@ public class TopNQueryRunnerTest
TopNQuery query = new TopNQueryBuilder() TopNQuery query = new TopNQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.dimension(providerDimension) .dimension(marketDimension)
.metric(new LexicographicTopNMetricSpec("t")) .metric(new LexicographicTopNMetricSpec("t"))
.threshold(4) .threshold(4)
.intervals(QueryRunnerTestHelper.firstToThird) .intervals(QueryRunnerTestHelper.firstToThird)
@ -1058,14 +1058,14 @@ public class TopNQueryRunnerTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "total_market", marketDimension, "total_market",
"rows", 4L, "rows", 4L,
"index", 5351.814697265625D, "index", 5351.814697265625D,
"addRowsIndexConstant", 5356.814697265625D, "addRowsIndexConstant", 5356.814697265625D,
"uniques", QueryRunnerTestHelper.UNIQUES_2 "uniques", QueryRunnerTestHelper.UNIQUES_2
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "upfront", marketDimension, "upfront",
"rows", 4L, "rows", 4L,
"index", 4875.669677734375D, "index", 4875.669677734375D,
"addRowsIndexConstant", 4880.669677734375D, "addRowsIndexConstant", 4880.669677734375D,
@ -1085,7 +1085,7 @@ public class TopNQueryRunnerTest
TopNQuery query = new TopNQueryBuilder() TopNQuery query = new TopNQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.dimension(providerDimension) .dimension(marketDimension)
.metric(new InvertedTopNMetricSpec(new LexicographicTopNMetricSpec("upfront"))) .metric(new InvertedTopNMetricSpec(new LexicographicTopNMetricSpec("upfront")))
.threshold(4) .threshold(4)
.intervals(QueryRunnerTestHelper.firstToThird) .intervals(QueryRunnerTestHelper.firstToThird)
@ -1099,14 +1099,14 @@ public class TopNQueryRunnerTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "total_market", marketDimension, "total_market",
"rows", 4L, "rows", 4L,
"index", 5351.814697265625D, "index", 5351.814697265625D,
"addRowsIndexConstant", 5356.814697265625D, "addRowsIndexConstant", 5356.814697265625D,
"uniques", QueryRunnerTestHelper.UNIQUES_2 "uniques", QueryRunnerTestHelper.UNIQUES_2
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "spot", marketDimension, "spot",
"rows", 18L, "rows", 18L,
"index", 2231.8768157958984D, "index", 2231.8768157958984D,
"addRowsIndexConstant", 2250.8768157958984D, "addRowsIndexConstant", 2250.8768157958984D,
@ -1126,7 +1126,7 @@ public class TopNQueryRunnerTest
TopNQuery query = new TopNQueryBuilder() TopNQuery query = new TopNQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.dimension(providerDimension) .dimension(marketDimension)
.metric(new InvertedTopNMetricSpec(new LexicographicTopNMetricSpec("u"))) .metric(new InvertedTopNMetricSpec(new LexicographicTopNMetricSpec("u")))
.threshold(4) .threshold(4)
.intervals(QueryRunnerTestHelper.firstToThird) .intervals(QueryRunnerTestHelper.firstToThird)
@ -1140,14 +1140,14 @@ public class TopNQueryRunnerTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "total_market", marketDimension, "total_market",
"rows", 4L, "rows", 4L,
"index", 5351.814697265625D, "index", 5351.814697265625D,
"addRowsIndexConstant", 5356.814697265625D, "addRowsIndexConstant", 5356.814697265625D,
"uniques", QueryRunnerTestHelper.UNIQUES_2 "uniques", QueryRunnerTestHelper.UNIQUES_2
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "spot", marketDimension, "spot",
"rows", 18L, "rows", 18L,
"index", 2231.8768157958984D, "index", 2231.8768157958984D,
"addRowsIndexConstant", 2250.8768157958984D, "addRowsIndexConstant", 2250.8768157958984D,
@ -1169,7 +1169,7 @@ public class TopNQueryRunnerTest
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.dimension( .dimension(
new ExtractionDimensionSpec( new ExtractionDimensionSpec(
providerDimension, providerDimension, new RegexDimExtractionFn("(.)") marketDimension, marketDimension, new RegexDimExtractionFn("(.)")
) )
) )
.metric("rows") .metric("rows")
@ -1185,21 +1185,21 @@ public class TopNQueryRunnerTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "s", marketDimension, "s",
"rows", 18L, "rows", 18L,
"index", 2231.8768157958984D, "index", 2231.8768157958984D,
"addRowsIndexConstant", 2250.8768157958984D, "addRowsIndexConstant", 2250.8768157958984D,
"uniques", QueryRunnerTestHelper.UNIQUES_9 "uniques", QueryRunnerTestHelper.UNIQUES_9
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "t", marketDimension, "t",
"rows", 4L, "rows", 4L,
"index", 5351.814697265625D, "index", 5351.814697265625D,
"addRowsIndexConstant", 5356.814697265625D, "addRowsIndexConstant", 5356.814697265625D,
"uniques", QueryRunnerTestHelper.UNIQUES_2 "uniques", QueryRunnerTestHelper.UNIQUES_2
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "u", marketDimension, "u",
"rows", 4L, "rows", 4L,
"index", 4875.669677734375D, "index", 4875.669677734375D,
"addRowsIndexConstant", 4880.669677734375D, "addRowsIndexConstant", 4880.669677734375D,
@ -1221,7 +1221,7 @@ public class TopNQueryRunnerTest
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.dimension( .dimension(
new ExtractionDimensionSpec( new ExtractionDimensionSpec(
providerDimension, providerDimension, new RegexDimExtractionFn("(.)") marketDimension, marketDimension, new RegexDimExtractionFn("(.)")
) )
) )
.metric(new LexicographicTopNMetricSpec(null)) .metric(new LexicographicTopNMetricSpec(null))
@ -1237,21 +1237,21 @@ public class TopNQueryRunnerTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "s", marketDimension, "s",
"rows", 18L, "rows", 18L,
"index", 2231.8768157958984D, "index", 2231.8768157958984D,
"addRowsIndexConstant", 2250.8768157958984D, "addRowsIndexConstant", 2250.8768157958984D,
"uniques", QueryRunnerTestHelper.UNIQUES_9 "uniques", QueryRunnerTestHelper.UNIQUES_9
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "t", marketDimension, "t",
"rows", 4L, "rows", 4L,
"index", 5351.814697265625D, "index", 5351.814697265625D,
"addRowsIndexConstant", 5356.814697265625D, "addRowsIndexConstant", 5356.814697265625D,
"uniques", QueryRunnerTestHelper.UNIQUES_2 "uniques", QueryRunnerTestHelper.UNIQUES_2
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "u", marketDimension, "u",
"rows", 4L, "rows", 4L,
"index", 4875.669677734375D, "index", 4875.669677734375D,
"addRowsIndexConstant", 4880.669677734375D, "addRowsIndexConstant", 4880.669677734375D,
@ -1273,7 +1273,7 @@ public class TopNQueryRunnerTest
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.dimension( .dimension(
new ExtractionDimensionSpec( new ExtractionDimensionSpec(
providerDimension, providerDimension, new RegexDimExtractionFn("..(.)") marketDimension, marketDimension, new RegexDimExtractionFn("..(.)")
) )
) )
.metric(new InvertedTopNMetricSpec(new LexicographicTopNMetricSpec(null))) .metric(new InvertedTopNMetricSpec(new LexicographicTopNMetricSpec(null)))
@ -1289,21 +1289,21 @@ public class TopNQueryRunnerTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "t", marketDimension, "t",
"rows", 4L, "rows", 4L,
"index", 5351.814697265625D, "index", 5351.814697265625D,
"addRowsIndexConstant", 5356.814697265625D, "addRowsIndexConstant", 5356.814697265625D,
"uniques", QueryRunnerTestHelper.UNIQUES_2 "uniques", QueryRunnerTestHelper.UNIQUES_2
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "o", marketDimension, "o",
"rows", 18L, "rows", 18L,
"index", 2231.8768157958984D, "index", 2231.8768157958984D,
"addRowsIndexConstant", 2250.8768157958984D, "addRowsIndexConstant", 2250.8768157958984D,
"uniques", QueryRunnerTestHelper.UNIQUES_9 "uniques", QueryRunnerTestHelper.UNIQUES_9
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "f", marketDimension, "f",
"rows", 4L, "rows", 4L,
"index", 4875.669677734375D, "index", 4875.669677734375D,
"addRowsIndexConstant", 4880.669677734375D, "addRowsIndexConstant", 4880.669677734375D,
@ -1325,7 +1325,7 @@ public class TopNQueryRunnerTest
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.dimension( .dimension(
new ExtractionDimensionSpec( new ExtractionDimensionSpec(
providerDimension, providerDimension, new RegexDimExtractionFn("(.)") marketDimension, marketDimension, new RegexDimExtractionFn("(.)")
) )
) )
.metric(new LexicographicTopNMetricSpec("spot")) .metric(new LexicographicTopNMetricSpec("spot"))
@ -1341,14 +1341,14 @@ public class TopNQueryRunnerTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "t", marketDimension, "t",
"rows", 4L, "rows", 4L,
"index", 5351.814697265625D, "index", 5351.814697265625D,
"addRowsIndexConstant", 5356.814697265625D, "addRowsIndexConstant", 5356.814697265625D,
"uniques", QueryRunnerTestHelper.UNIQUES_2 "uniques", QueryRunnerTestHelper.UNIQUES_2
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "u", marketDimension, "u",
"rows", 4L, "rows", 4L,
"index", 4875.669677734375D, "index", 4875.669677734375D,
"addRowsIndexConstant", 4880.669677734375D, "addRowsIndexConstant", 4880.669677734375D,
@ -1371,7 +1371,7 @@ public class TopNQueryRunnerTest
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.dimension( .dimension(
new ExtractionDimensionSpec( new ExtractionDimensionSpec(
providerDimension, providerDimension, new RegexDimExtractionFn("(.)") marketDimension, marketDimension, new RegexDimExtractionFn("(.)")
) )
) )
.metric(new InvertedTopNMetricSpec(new LexicographicTopNMetricSpec("u"))) .metric(new InvertedTopNMetricSpec(new LexicographicTopNMetricSpec("u")))
@ -1387,14 +1387,14 @@ public class TopNQueryRunnerTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "t", marketDimension, "t",
"rows", 4L, "rows", 4L,
"index", 5351.814697265625D, "index", 5351.814697265625D,
"addRowsIndexConstant", 5356.814697265625D, "addRowsIndexConstant", 5356.814697265625D,
"uniques", QueryRunnerTestHelper.UNIQUES_2 "uniques", QueryRunnerTestHelper.UNIQUES_2
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "s", marketDimension, "s",
"rows", 18L, "rows", 18L,
"index", 2231.8768157958984D, "index", 2231.8768157958984D,
"addRowsIndexConstant", 2250.8768157958984D, "addRowsIndexConstant", 2250.8768157958984D,
@ -1416,7 +1416,7 @@ public class TopNQueryRunnerTest
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.dimension( .dimension(
new ExtractionDimensionSpec( new ExtractionDimensionSpec(
providerDimension, providerDimension, new RegexDimExtractionFn("..(.)") marketDimension, marketDimension, new RegexDimExtractionFn("..(.)")
) )
) )
.metric(new InvertedTopNMetricSpec(new LexicographicTopNMetricSpec("p"))) .metric(new InvertedTopNMetricSpec(new LexicographicTopNMetricSpec("p")))
@ -1432,14 +1432,14 @@ public class TopNQueryRunnerTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "o", marketDimension, "o",
"rows", 18L, "rows", 18L,
"index", 2231.8768157958984D, "index", 2231.8768157958984D,
"addRowsIndexConstant", 2250.8768157958984D, "addRowsIndexConstant", 2250.8768157958984D,
"uniques", QueryRunnerTestHelper.UNIQUES_9 "uniques", QueryRunnerTestHelper.UNIQUES_9
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "f", marketDimension, "f",
"rows", 4L, "rows", 4L,
"index", 4875.669677734375D, "index", 4875.669677734375D,
"addRowsIndexConstant", 4880.669677734375D, "addRowsIndexConstant", 4880.669677734375D,
@ -1460,7 +1460,7 @@ public class TopNQueryRunnerTest
new TopNQueryBuilder() new TopNQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.dimension(providerDimension) .dimension(marketDimension)
.metric(new InvertedTopNMetricSpec(new NumericTopNMetricSpec(QueryRunnerTestHelper.indexMetric))) .metric(new InvertedTopNMetricSpec(new NumericTopNMetricSpec(QueryRunnerTestHelper.indexMetric)))
.threshold(3) .threshold(3)
.intervals(QueryRunnerTestHelper.firstToThird) .intervals(QueryRunnerTestHelper.firstToThird)
@ -1474,21 +1474,21 @@ public class TopNQueryRunnerTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "spot", marketDimension, "spot",
"rows", 18L, "rows", 18L,
"index", 2231.8768157958984D, "index", 2231.8768157958984D,
"addRowsIndexConstant", 2250.8768157958984D, "addRowsIndexConstant", 2250.8768157958984D,
"uniques", QueryRunnerTestHelper.UNIQUES_9 "uniques", QueryRunnerTestHelper.UNIQUES_9
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "upfront", marketDimension, "upfront",
"rows", 4L, "rows", 4L,
"index", 4875.669677734375D, "index", 4875.669677734375D,
"addRowsIndexConstant", 4880.669677734375D, "addRowsIndexConstant", 4880.669677734375D,
"uniques", QueryRunnerTestHelper.UNIQUES_2 "uniques", QueryRunnerTestHelper.UNIQUES_2
), ),
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
providerDimension, "total_market", marketDimension, "total_market",
"rows", 4L, "rows", 4L,
"index", 5351.814697265625D, "index", 5351.814697265625D,
"addRowsIndexConstant", 5356.814697265625D, "addRowsIndexConstant", 5356.814697265625D,
@ -1508,7 +1508,7 @@ public class TopNQueryRunnerTest
TopNQuery query = new TopNQueryBuilder() TopNQuery query = new TopNQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.dimension(providerDimension) .dimension(marketDimension)
.metric(QueryRunnerTestHelper.dependentPostAggMetric) .metric(QueryRunnerTestHelper.dependentPostAggMetric)
.threshold(4) .threshold(4)
.intervals(QueryRunnerTestHelper.fullOnInterval) .intervals(QueryRunnerTestHelper.fullOnInterval)
@ -1538,7 +1538,7 @@ public class TopNQueryRunnerTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put(providerDimension, "total_market") .put(marketDimension, "total_market")
.put("rows", 186L) .put("rows", 186L)
.put("index", 215679.82879638672D) .put("index", 215679.82879638672D)
.put("addRowsIndexConstant", 215866.82879638672D) .put("addRowsIndexConstant", 215866.82879638672D)
@ -1552,7 +1552,7 @@ public class TopNQueryRunnerTest
) )
.build(), .build(),
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put(providerDimension, "upfront") .put(marketDimension, "upfront")
.put("rows", 186L) .put("rows", 186L)
.put("index", 192046.1060180664D) .put("index", 192046.1060180664D)
.put("addRowsIndexConstant", 192233.1060180664D) .put("addRowsIndexConstant", 192233.1060180664D)
@ -1566,7 +1566,7 @@ public class TopNQueryRunnerTest
) )
.build(), .build(),
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put(providerDimension, "spot") .put(marketDimension, "spot")
.put("rows", 837L) .put("rows", 837L)
.put("index", 95606.57232284546D) .put("index", 95606.57232284546D)
.put("addRowsIndexConstant", 96444.57232284546D) .put("addRowsIndexConstant", 96444.57232284546D)
@ -1593,7 +1593,7 @@ public class TopNQueryRunnerTest
TopNQuery query = new TopNQueryBuilder() TopNQuery query = new TopNQueryBuilder()
.dataSource(QueryRunnerTestHelper.dataSource) .dataSource(QueryRunnerTestHelper.dataSource)
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.dimension(QueryRunnerTestHelper.providerDimension) .dimension(QueryRunnerTestHelper.marketDimension)
.metric(QueryRunnerTestHelper.dependentPostAggMetric) .metric(QueryRunnerTestHelper.dependentPostAggMetric)
.threshold(4) .threshold(4)
.intervals(QueryRunnerTestHelper.fullOnInterval) .intervals(QueryRunnerTestHelper.fullOnInterval)
@ -1619,7 +1619,7 @@ public class TopNQueryRunnerTest
TopNResultValue topNResult = new TopNResultValue( TopNResultValue topNResult = new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put(QueryRunnerTestHelper.providerDimension, "total_market") .put(QueryRunnerTestHelper.marketDimension, "total_market")
.put("rows", 186L) .put("rows", 186L)
.put("index", 215679.82879638672D) .put("index", 215679.82879638672D)
.put("addRowsIndexConstant", 215866.82879638672D) .put("addRowsIndexConstant", 215866.82879638672D)
@ -1629,7 +1629,7 @@ public class TopNQueryRunnerTest
.put("minIndex", 792.3260498046875D) .put("minIndex", 792.3260498046875D)
.build(), .build(),
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put(QueryRunnerTestHelper.providerDimension, "upfront") .put(QueryRunnerTestHelper.marketDimension, "upfront")
.put("rows", 186L) .put("rows", 186L)
.put("index", 192046.1060180664D) .put("index", 192046.1060180664D)
.put("addRowsIndexConstant", 192233.1060180664D) .put("addRowsIndexConstant", 192233.1060180664D)
@ -1639,7 +1639,7 @@ public class TopNQueryRunnerTest
.put("minIndex", 545.9906005859375D) .put("minIndex", 545.9906005859375D)
.build(), .build(),
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put(QueryRunnerTestHelper.providerDimension, "spot") .put(QueryRunnerTestHelper.marketDimension, "spot")
.put("rows", 837L) .put("rows", 837L)
.put("index", 95606.57232284546D) .put("index", 95606.57232284546D)
.put("addRowsIndexConstant", 96444.57232284546D) .put("addRowsIndexConstant", 96444.57232284546D)

View File

@ -42,7 +42,7 @@ import static io.druid.query.QueryRunnerTestHelper.commonAggregators;
import static io.druid.query.QueryRunnerTestHelper.dataSource; import static io.druid.query.QueryRunnerTestHelper.dataSource;
import static io.druid.query.QueryRunnerTestHelper.fullOnInterval; import static io.druid.query.QueryRunnerTestHelper.fullOnInterval;
import static io.druid.query.QueryRunnerTestHelper.indexMetric; import static io.druid.query.QueryRunnerTestHelper.indexMetric;
import static io.druid.query.QueryRunnerTestHelper.providerDimension; import static io.druid.query.QueryRunnerTestHelper.marketDimension;
public class TopNQueryTest public class TopNQueryTest
{ {
@ -54,7 +54,7 @@ public class TopNQueryTest
Query query = new TopNQueryBuilder() Query query = new TopNQueryBuilder()
.dataSource(dataSource) .dataSource(dataSource)
.granularity(allGran) .granularity(allGran)
.dimension(providerDimension) .dimension(marketDimension)
.metric(indexMetric) .metric(indexMetric)
.threshold(4) .threshold(4)
.intervals(fullOnInterval) .intervals(fullOnInterval)

View File

@ -98,7 +98,7 @@ public class TopNUnionQueryTest
TopNQuery query = new TopNQueryBuilder() TopNQuery query = new TopNQueryBuilder()
.dataSource(QueryRunnerTestHelper.unionDataSource) .dataSource(QueryRunnerTestHelper.unionDataSource)
.granularity(QueryRunnerTestHelper.allGran) .granularity(QueryRunnerTestHelper.allGran)
.dimension(QueryRunnerTestHelper.providerDimension) .dimension(QueryRunnerTestHelper.marketDimension)
.metric(QueryRunnerTestHelper.dependentPostAggMetric) .metric(QueryRunnerTestHelper.dependentPostAggMetric)
.threshold(4) .threshold(4)
.intervals(QueryRunnerTestHelper.fullOnInterval) .intervals(QueryRunnerTestHelper.fullOnInterval)
@ -128,7 +128,7 @@ public class TopNUnionQueryTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put(QueryRunnerTestHelper.providerDimension, "total_market") .put(QueryRunnerTestHelper.marketDimension, "total_market")
.put("rows", 744L) .put("rows", 744L)
.put("index", 862719.3151855469D) .put("index", 862719.3151855469D)
.put("addRowsIndexConstant", 863464.3151855469D) .put("addRowsIndexConstant", 863464.3151855469D)
@ -142,7 +142,7 @@ public class TopNUnionQueryTest
) )
.build(), .build(),
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put(QueryRunnerTestHelper.providerDimension, "upfront") .put(QueryRunnerTestHelper.marketDimension, "upfront")
.put("rows", 744L) .put("rows", 744L)
.put("index", 768184.4240722656D) .put("index", 768184.4240722656D)
.put("addRowsIndexConstant", 768929.4240722656D) .put("addRowsIndexConstant", 768929.4240722656D)
@ -156,7 +156,7 @@ public class TopNUnionQueryTest
) )
.build(), .build(),
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put(QueryRunnerTestHelper.providerDimension, "spot") .put(QueryRunnerTestHelper.marketDimension, "spot")
.put("rows", 3348L) .put("rows", 3348L)
.put("index", 382426.28929138184D) .put("index", 382426.28929138184D)
.put("addRowsIndexConstant", 385775.28929138184D) .put("addRowsIndexConstant", 385775.28929138184D)

View File

@ -79,7 +79,7 @@ public class AppendTest
final QueryGranularity allGran = QueryGranularity.ALL; final QueryGranularity allGran = QueryGranularity.ALL;
final String dimensionValue = "dimension"; final String dimensionValue = "dimension";
final String valueValue = "value"; final String valueValue = "value";
final String providerDimension = "provider"; final String marketDimension = "market";
final String qualityDimension = "quality"; final String qualityDimension = "quality";
final String placementDimension = "placement"; final String placementDimension = "placement";
final String placementishDimension = "placementish"; final String placementishDimension = "placementish";
@ -309,7 +309,7 @@ public class AppendTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "spot") .put("market", "spot")
.put("rows", 3L) .put("rows", 3L)
.put("index", 300.0D) .put("index", 300.0D)
.put("addRowsIndexConstant", 304.0D) .put("addRowsIndexConstant", 304.0D)
@ -319,7 +319,7 @@ public class AppendTest
.build(), .build(),
new HashMap<String, Object>() new HashMap<String, Object>()
{{ {{
put("provider", null); put("market", null);
put("rows", 3L); put("rows", 3L);
put("index", 200.0D); put("index", 200.0D);
put("addRowsIndexConstant", 204.0D); put("addRowsIndexConstant", 204.0D);
@ -328,7 +328,7 @@ public class AppendTest
put("minIndex", 0.0); put("minIndex", 0.0);
}}, }},
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "total_market") .put("market", "total_market")
.put("rows", 2L) .put("rows", 2L)
.put("index", 200.0D) .put("index", 200.0D)
.put("addRowsIndexConstant", 203.0D) .put("addRowsIndexConstant", 203.0D)
@ -355,7 +355,7 @@ public class AppendTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "total_market") .put("market", "total_market")
.put("rows", 3L) .put("rows", 3L)
.put("index", 300.0D) .put("index", 300.0D)
.put("addRowsIndexConstant", 304.0D) .put("addRowsIndexConstant", 304.0D)
@ -365,7 +365,7 @@ public class AppendTest
.build(), .build(),
new HashMap<String, Object>() new HashMap<String, Object>()
{{ {{
put("provider", null); put("market", null);
put("rows", 3L); put("rows", 3L);
put("index", 100.0D); put("index", 100.0D);
put("addRowsIndexConstant", 104.0D); put("addRowsIndexConstant", 104.0D);
@ -374,7 +374,7 @@ public class AppendTest
put("minIndex", 0.0); put("minIndex", 0.0);
}}, }},
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "spot") .put("market", "spot")
.put("rows", 1L) .put("rows", 1L)
.put("index", 100.0D) .put("index", 100.0D)
.put("addRowsIndexConstant", 102.0D) .put("addRowsIndexConstant", 102.0D)
@ -401,7 +401,7 @@ public class AppendTest
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "spot") .put("market", "spot")
.put("rows", 1L) .put("rows", 1L)
.put("index", 100.0D) .put("index", 100.0D)
.put("addRowsIndexConstant", 102.0D) .put("addRowsIndexConstant", 102.0D)
@ -447,7 +447,7 @@ public class AppendTest
new SearchHit(placementishDimension, "a"), new SearchHit(placementishDimension, "a"),
new SearchHit(qualityDimension, "automotive"), new SearchHit(qualityDimension, "automotive"),
new SearchHit(placementDimension, "mezzanine"), new SearchHit(placementDimension, "mezzanine"),
new SearchHit(providerDimension, "total_market") new SearchHit(marketDimension, "total_market")
) )
) )
) )
@ -468,7 +468,7 @@ public class AppendTest
Arrays.<SearchHit>asList( Arrays.<SearchHit>asList(
new SearchHit(placementishDimension, "a"), new SearchHit(placementishDimension, "a"),
new SearchHit(placementDimension, "mezzanine"), new SearchHit(placementDimension, "mezzanine"),
new SearchHit(providerDimension, "total_market") new SearchHit(marketDimension, "total_market")
) )
) )
) )
@ -488,7 +488,7 @@ public class AppendTest
new SearchResultValue( new SearchResultValue(
Arrays.<SearchHit>asList( Arrays.<SearchHit>asList(
new SearchHit(placementDimension, "mezzanine"), new SearchHit(placementDimension, "mezzanine"),
new SearchHit(providerDimension, "total_market") new SearchHit(marketDimension, "total_market")
) )
) )
) )
@ -509,7 +509,7 @@ public class AppendTest
Arrays.<SearchHit>asList( Arrays.<SearchHit>asList(
new SearchHit(placementishDimension, "a"), new SearchHit(placementishDimension, "a"),
new SearchHit(placementDimension, "mezzanine"), new SearchHit(placementDimension, "mezzanine"),
new SearchHit(providerDimension, "total_market") new SearchHit(marketDimension, "total_market")
) )
) )
) )
@ -543,7 +543,7 @@ public class AppendTest
.dataSource(dataSource) .dataSource(dataSource)
.granularity(allGran) .granularity(allGran)
.intervals(fullOnInterval) .intervals(fullOnInterval)
.filters(providerDimension, "breakstuff") .filters(marketDimension, "breakstuff")
.aggregators( .aggregators(
Lists.<AggregatorFactory>newArrayList( Lists.<AggregatorFactory>newArrayList(
Iterables.concat( Iterables.concat(
@ -593,11 +593,11 @@ public class AppendTest
.fields( .fields(
Arrays.<DimFilter>asList( Arrays.<DimFilter>asList(
Druids.newSelectorDimFilterBuilder() Druids.newSelectorDimFilterBuilder()
.dimension(providerDimension) .dimension(marketDimension)
.value("spot") .value("spot")
.build(), .build(),
Druids.newSelectorDimFilterBuilder() Druids.newSelectorDimFilterBuilder()
.dimension(providerDimension) .dimension(marketDimension)
.value("total_market") .value("total_market")
.build() .build()
) )
@ -623,7 +623,7 @@ public class AppendTest
return new TopNQueryBuilder() return new TopNQueryBuilder()
.dataSource(dataSource) .dataSource(dataSource)
.granularity(allGran) .granularity(allGran)
.dimension(providerDimension) .dimension(marketDimension)
.metric(indexMetric) .metric(indexMetric)
.threshold(3) .threshold(3)
.intervals(fullOnInterval) .intervals(fullOnInterval)
@ -647,7 +647,7 @@ public class AppendTest
return new TopNQueryBuilder() return new TopNQueryBuilder()
.dataSource(dataSource) .dataSource(dataSource)
.granularity(allGran) .granularity(allGran)
.dimension(providerDimension) .dimension(marketDimension)
.metric(indexMetric) .metric(indexMetric)
.threshold(3) .threshold(3)
.filters( .filters(
@ -655,7 +655,7 @@ public class AppendTest
.fields( .fields(
Arrays.<DimFilter>asList( Arrays.<DimFilter>asList(
Druids.newSelectorDimFilterBuilder() Druids.newSelectorDimFilterBuilder()
.dimension(providerDimension) .dimension(marketDimension)
.value("spot") .value("spot")
.build(), .build(),
Druids.newSelectorDimFilterBuilder() Druids.newSelectorDimFilterBuilder()
@ -699,7 +699,7 @@ public class AppendTest
Druids.newNotDimFilterBuilder() Druids.newNotDimFilterBuilder()
.field( .field(
Druids.newSelectorDimFilterBuilder() Druids.newSelectorDimFilterBuilder()
.dimension(providerDimension) .dimension(marketDimension)
.value("spot") .value("spot")
.build() .build()
).build() ).build()

View File

@ -71,7 +71,7 @@ public class SchemalessTestFull
final QueryGranularity allGran = QueryGranularity.ALL; final QueryGranularity allGran = QueryGranularity.ALL;
final String dimensionValue = "dimension"; final String dimensionValue = "dimension";
final String valueValue = "value"; final String valueValue = "value";
final String providerDimension = "provider"; final String marketDimension = "market";
final String qualityDimension = "quality"; final String qualityDimension = "quality";
final String placementDimension = "placement"; final String placementDimension = "placement";
final String placementishDimension = "placementish"; final String placementishDimension = "placementish";
@ -133,7 +133,7 @@ public class SchemalessTestFull
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "spot") .put("market", "spot")
.put("rows", 1L) .put("rows", 1L)
.put("index", 100.0D) .put("index", 100.0D)
.put("addRowsIndexConstant", 102.0D) .put("addRowsIndexConstant", 102.0D)
@ -142,7 +142,7 @@ public class SchemalessTestFull
.put("minIndex", 100.0) .put("minIndex", 100.0)
.build(), .build(),
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "total_market") .put("market", "total_market")
.put("rows", 1L) .put("rows", 1L)
.put("index", 100.0D) .put("index", 100.0D)
.put("addRowsIndexConstant", 102.0D) .put("addRowsIndexConstant", 102.0D)
@ -161,7 +161,7 @@ public class SchemalessTestFull
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "spot") .put("market", "spot")
.put("rows", 1L) .put("rows", 1L)
.put("index", 100.0D) .put("index", 100.0D)
.put("addRowsIndexConstant", 102.0D) .put("addRowsIndexConstant", 102.0D)
@ -182,7 +182,7 @@ public class SchemalessTestFull
new SearchHit(placementishDimension, "a"), new SearchHit(placementishDimension, "a"),
new SearchHit(qualityDimension, "automotive"), new SearchHit(qualityDimension, "automotive"),
new SearchHit(placementDimension, "mezzanine"), new SearchHit(placementDimension, "mezzanine"),
new SearchHit(providerDimension, "total_market") new SearchHit(marketDimension, "total_market")
) )
) )
) )
@ -268,7 +268,7 @@ public class SchemalessTestFull
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "") .put("market", "")
.put("rows", 2L) .put("rows", 2L)
.put("index", 200.0D) .put("index", 200.0D)
.put("addRowsIndexConstant", 203.0D) .put("addRowsIndexConstant", 203.0D)
@ -277,7 +277,7 @@ public class SchemalessTestFull
.put("minIndex", 100.0) .put("minIndex", 100.0)
.build(), .build(),
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "spot") .put("market", "spot")
.put("rows", 1L) .put("rows", 1L)
.put("index", 100.0D) .put("index", 100.0D)
.put("addRowsIndexConstant", 102.0D) .put("addRowsIndexConstant", 102.0D)
@ -296,7 +296,7 @@ public class SchemalessTestFull
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "") .put("market", "")
.put("rows", 1L) .put("rows", 1L)
.put("index", 100.0D) .put("index", 100.0D)
.put("addRowsIndexConstant", 102.0D) .put("addRowsIndexConstant", 102.0D)
@ -305,7 +305,7 @@ public class SchemalessTestFull
.put("minIndex", 100.0) .put("minIndex", 100.0)
.build(), .build(),
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "spot") .put("market", "spot")
.put("rows", 1L) .put("rows", 1L)
.put("index", 100.0D) .put("index", 100.0D)
.put("addRowsIndexConstant", 102.0D) .put("addRowsIndexConstant", 102.0D)
@ -407,7 +407,7 @@ public class SchemalessTestFull
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "spot") .put("market", "spot")
.put("rows", 1L) .put("rows", 1L)
.put("index", 100.0D) .put("index", 100.0D)
.put("addRowsIndexConstant", 102.0D) .put("addRowsIndexConstant", 102.0D)
@ -417,7 +417,7 @@ public class SchemalessTestFull
.build(), .build(),
new HashMap<String, Object>() new HashMap<String, Object>()
{{ {{
put("provider", null); put("market", null);
put("rows", 1L); put("rows", 1L);
put("index", 0.0D); put("index", 0.0D);
put("addRowsIndexConstant", 2.0D); put("addRowsIndexConstant", 2.0D);
@ -436,7 +436,7 @@ public class SchemalessTestFull
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "spot") .put("market", "spot")
.put("rows", 1L) .put("rows", 1L)
.put("index", 100.0D) .put("index", 100.0D)
.put("addRowsIndexConstant", 102.0D) .put("addRowsIndexConstant", 102.0D)
@ -540,7 +540,7 @@ public class SchemalessTestFull
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "spot") .put("market", "spot")
.put("rows", 1L) .put("rows", 1L)
.put("index", 100.0D) .put("index", 100.0D)
.put("addRowsIndexConstant", 102.0D) .put("addRowsIndexConstant", 102.0D)
@ -549,7 +549,7 @@ public class SchemalessTestFull
.put("minIndex", 100.0) .put("minIndex", 100.0)
.build(), .build(),
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "total_market") .put("market", "total_market")
.put("rows", 1L) .put("rows", 1L)
.put("index", 100.0D) .put("index", 100.0D)
.put("addRowsIndexConstant", 102.0D) .put("addRowsIndexConstant", 102.0D)
@ -568,7 +568,7 @@ public class SchemalessTestFull
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "spot") .put("market", "spot")
.put("rows", 1L) .put("rows", 1L)
.put("index", 100.0D) .put("index", 100.0D)
.put("addRowsIndexConstant", 102.0D) .put("addRowsIndexConstant", 102.0D)
@ -587,7 +587,7 @@ public class SchemalessTestFull
new SearchResultValue( new SearchResultValue(
Arrays.<SearchHit>asList( Arrays.<SearchHit>asList(
new SearchHit(qualityDimension, "automotive"), new SearchHit(qualityDimension, "automotive"),
new SearchHit(providerDimension, "total_market") new SearchHit(marketDimension, "total_market")
) )
) )
) )
@ -658,7 +658,7 @@ public class SchemalessTestFull
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "spot") .put("market", "spot")
.put("rows", 2L) .put("rows", 2L)
.put("index", 200.0D) .put("index", 200.0D)
.put("addRowsIndexConstant", 203.0D) .put("addRowsIndexConstant", 203.0D)
@ -755,7 +755,7 @@ public class SchemalessTestFull
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "spot") .put("market", "spot")
.put("rows", 1L) .put("rows", 1L)
.put("index", 100.0D) .put("index", 100.0D)
.put("addRowsIndexConstant", 102.0D) .put("addRowsIndexConstant", 102.0D)
@ -765,7 +765,7 @@ public class SchemalessTestFull
.build(), .build(),
new HashMap<String, Object>() new HashMap<String, Object>()
{{ {{
put("provider", null); put("market", null);
put("rows", 1L); put("rows", 1L);
put("index", 0.0D); put("index", 0.0D);
put("addRowsIndexConstant", 2.0D); put("addRowsIndexConstant", 2.0D);
@ -784,7 +784,7 @@ public class SchemalessTestFull
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "spot") .put("market", "spot")
.put("rows", 1L) .put("rows", 1L)
.put("index", 100.0D) .put("index", 100.0D)
.put("addRowsIndexConstant", 102.0D) .put("addRowsIndexConstant", 102.0D)
@ -942,7 +942,7 @@ public class SchemalessTestFull
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "spot") .put("market", "spot")
.put("rows", 1L) .put("rows", 1L)
.put("index", 200.0D) .put("index", 200.0D)
.put("addRowsIndexConstant", 202.0D) .put("addRowsIndexConstant", 202.0D)
@ -1042,7 +1042,7 @@ public class SchemalessTestFull
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
new HashMap<String, Object>() new HashMap<String, Object>()
{{ {{
put("provider", null); put("market", null);
put("rows", 2L); put("rows", 2L);
put("index", 200.0D); put("index", 200.0D);
put("addRowsIndexConstant", 203.0D); put("addRowsIndexConstant", 203.0D);
@ -1051,7 +1051,7 @@ public class SchemalessTestFull
put("minIndex", 100.0); put("minIndex", 100.0);
}}, }},
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "spot") .put("market", "spot")
.put("rows", 1L) .put("rows", 1L)
.put("index", 100.0D) .put("index", 100.0D)
.put("addRowsIndexConstant", 102.0D) .put("addRowsIndexConstant", 102.0D)
@ -1070,7 +1070,7 @@ public class SchemalessTestFull
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "spot") .put("market", "spot")
.put("rows", 1L) .put("rows", 1L)
.put("index", 100.0D) .put("index", 100.0D)
.put("addRowsIndexConstant", 102.0D) .put("addRowsIndexConstant", 102.0D)
@ -1175,7 +1175,7 @@ public class SchemalessTestFull
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "spot") .put("market", "spot")
.put("rows", 4L) .put("rows", 4L)
.put("index", 400.0D) .put("index", 400.0D)
.put("addRowsIndexConstant", 405.0D) .put("addRowsIndexConstant", 405.0D)
@ -1184,7 +1184,7 @@ public class SchemalessTestFull
.put("minIndex", 100.0) .put("minIndex", 100.0)
.build(), .build(),
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "") .put("market", "")
.put("rows", 3L) .put("rows", 3L)
.put("index", 200.0D) .put("index", 200.0D)
.put("addRowsIndexConstant", 204.0D) .put("addRowsIndexConstant", 204.0D)
@ -1193,7 +1193,7 @@ public class SchemalessTestFull
.put("minIndex", 0.0) .put("minIndex", 0.0)
.build(), .build(),
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "total_market") .put("market", "total_market")
.put("rows", 2L) .put("rows", 2L)
.put("index", 200.0D) .put("index", 200.0D)
.put("addRowsIndexConstant", 203.0D) .put("addRowsIndexConstant", 203.0D)
@ -1212,7 +1212,7 @@ public class SchemalessTestFull
new TopNResultValue( new TopNResultValue(
Arrays.<Map<String, Object>>asList( Arrays.<Map<String, Object>>asList(
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "spot") .put("market", "spot")
.put("rows", 4L) .put("rows", 4L)
.put("index", 400.0D) .put("index", 400.0D)
.put("addRowsIndexConstant", 405.0D) .put("addRowsIndexConstant", 405.0D)
@ -1221,7 +1221,7 @@ public class SchemalessTestFull
.put("minIndex", 100.0) .put("minIndex", 100.0)
.build(), .build(),
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "") .put("market", "")
.put("rows", 1L) .put("rows", 1L)
.put("index", 100.0D) .put("index", 100.0D)
.put("addRowsIndexConstant", 102.0D) .put("addRowsIndexConstant", 102.0D)
@ -1242,7 +1242,7 @@ public class SchemalessTestFull
new SearchHit(placementishDimension, "a"), new SearchHit(placementishDimension, "a"),
new SearchHit(qualityDimension, "automotive"), new SearchHit(qualityDimension, "automotive"),
new SearchHit(placementDimension, "mezzanine"), new SearchHit(placementDimension, "mezzanine"),
new SearchHit(providerDimension, "total_market") new SearchHit(marketDimension, "total_market")
) )
) )
) )
@ -1403,7 +1403,7 @@ public class SchemalessTestFull
.dataSource(dataSource) .dataSource(dataSource)
.granularity(allGran) .granularity(allGran)
.intervals(fullOnInterval) .intervals(fullOnInterval)
.filters(providerDimension, "spot") .filters(marketDimension, "spot")
.aggregators( .aggregators(
Lists.<AggregatorFactory>newArrayList( Lists.<AggregatorFactory>newArrayList(
Iterables.concat( Iterables.concat(
@ -1432,7 +1432,7 @@ public class SchemalessTestFull
TopNQuery query = new TopNQueryBuilder() TopNQuery query = new TopNQueryBuilder()
.dataSource(dataSource) .dataSource(dataSource)
.granularity(allGran) .granularity(allGran)
.dimension(providerDimension) .dimension(marketDimension)
.metric(indexMetric) .metric(indexMetric)
.threshold(3) .threshold(3)
.intervals(fullOnInterval) .intervals(fullOnInterval)
@ -1464,8 +1464,8 @@ public class SchemalessTestFull
TopNQuery query = new TopNQueryBuilder() TopNQuery query = new TopNQueryBuilder()
.dataSource(dataSource) .dataSource(dataSource)
.granularity(allGran) .granularity(allGran)
.dimension(providerDimension) .dimension(marketDimension)
.filters(providerDimension, "spot") .filters(marketDimension, "spot")
.metric(indexMetric) .metric(indexMetric)
.threshold(3) .threshold(3)
.intervals(fullOnInterval) .intervals(fullOnInterval)
@ -1513,7 +1513,7 @@ public class SchemalessTestFull
SearchQuery query = Druids.newSearchQueryBuilder() SearchQuery query = Druids.newSearchQueryBuilder()
.dataSource(dataSource) .dataSource(dataSource)
.granularity(allGran) .granularity(allGran)
.filters(providerDimension, "spot") .filters(marketDimension, "spot")
.intervals(fullOnInterval) .intervals(fullOnInterval)
.query("a") .query("a")
.build(); .build();

View File

@ -97,7 +97,7 @@ public class SchemalessTestSimple
final QueryGranularity allGran = QueryGranularity.ALL; final QueryGranularity allGran = QueryGranularity.ALL;
final String dimensionValue = "dimension"; final String dimensionValue = "dimension";
final String valueValue = "value"; final String valueValue = "value";
final String providerDimension = "provider"; final String marketDimension = "market";
final String qualityDimension = "quality"; final String qualityDimension = "quality";
final String placementDimension = "placement"; final String placementDimension = "placement";
final String placementishDimension = "placementish"; final String placementishDimension = "placementish";
@ -175,7 +175,7 @@ public class SchemalessTestSimple
TopNQuery query = new TopNQueryBuilder() TopNQuery query = new TopNQueryBuilder()
.dataSource(dataSource) .dataSource(dataSource)
.granularity(allGran) .granularity(allGran)
.dimension(providerDimension) .dimension(marketDimension)
.metric(indexMetric) .metric(indexMetric)
.threshold(3) .threshold(3)
.intervals(fullOnInterval) .intervals(fullOnInterval)
@ -200,7 +200,7 @@ public class SchemalessTestSimple
Arrays.<DimensionAndMetricValueExtractor>asList( Arrays.<DimensionAndMetricValueExtractor>asList(
new DimensionAndMetricValueExtractor( new DimensionAndMetricValueExtractor(
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "spot") .put("market", "spot")
.put("rows", 4L) .put("rows", 4L)
.put("index", 400.0D) .put("index", 400.0D)
.put("addRowsIndexConstant", 405.0D) .put("addRowsIndexConstant", 405.0D)
@ -211,7 +211,7 @@ public class SchemalessTestSimple
), ),
new DimensionAndMetricValueExtractor( new DimensionAndMetricValueExtractor(
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "") .put("market", "")
.put("rows", 2L) .put("rows", 2L)
.put("index", 200.0D) .put("index", 200.0D)
.put("addRowsIndexConstant", 203.0D) .put("addRowsIndexConstant", 203.0D)
@ -222,7 +222,7 @@ public class SchemalessTestSimple
), ),
new DimensionAndMetricValueExtractor( new DimensionAndMetricValueExtractor(
ImmutableMap.<String, Object>builder() ImmutableMap.<String, Object>builder()
.put("provider", "total_market") .put("market", "total_market")
.put("rows", 2L) .put("rows", 2L)
.put("index", 200.0D) .put("index", 200.0D)
.put("addRowsIndexConstant", 203.0D) .put("addRowsIndexConstant", 203.0D)
@ -258,7 +258,7 @@ public class SchemalessTestSimple
new SearchHit(placementishDimension, "a"), new SearchHit(placementishDimension, "a"),
new SearchHit(qualityDimension, "automotive"), new SearchHit(qualityDimension, "automotive"),
new SearchHit(placementDimension, "mezzanine"), new SearchHit(placementDimension, "mezzanine"),
new SearchHit(providerDimension, "total_market") new SearchHit(marketDimension, "total_market")
) )
) )
) )

View File

@ -59,14 +59,14 @@ public class TestIndex
public static final String[] COLUMNS = new String[]{ public static final String[] COLUMNS = new String[]{
"ts", "ts",
"provider", "market",
"quALIty", "quALIty",
"plAcEmEnT", "plAcEmEnT",
"pLacementish", "pLacementish",
"iNdEx", "iNdEx",
"qualiTy_Uniques" "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"}; 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 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[]{ private static final AggregatorFactory[] METRIC_AGGS = new AggregatorFactory[]{

View File

@ -4,7 +4,7 @@
}, },
{ {
"timestamp":"2011-01-13T00:00:00.000Z", "timestamp":"2011-01-13T00:00:00.000Z",
"provider":"spot", "market":"spot",
"quality":"automotive", "quality":"automotive",
"placement":"preferred", "placement":"preferred",
"placementish":["a", "preferred"], "placementish":["a", "preferred"],
@ -12,7 +12,7 @@
}, },
{ {
"timestamp":"2011-01-14T00:00:00.000Z", "timestamp":"2011-01-14T00:00:00.000Z",
"provider":"spot", "market":"spot",
"quality":"automotive", "quality":"automotive",
"index":100.000000 "index":100.000000
}, },

View File

@ -1,14 +1,14 @@
[ [
{ {
"timestamp":"2011-01-14T22:00:00.000Z", "timestamp":"2011-01-14T22:00:00.000Z",
"provider":"total_market", "market":"total_market",
"placement":"preferred", "placement":"preferred",
"placementish":["h", "preferred"], "placementish":["h", "preferred"],
"index":100.000000 "index":100.000000
}, },
{ {
"timestamp":"2011-01-14T23:00:00.000Z", "timestamp":"2011-01-14T23:00:00.000Z",
"provider":"total_market", "market":"total_market",
"quality":"business", "quality":"business",
"placement":"mezzanine", "placement":"mezzanine",
"placementish":["p", "preferred"], "placementish":["p", "preferred"],
@ -17,7 +17,7 @@
{ {
"timestamp":"2011-01-15T00:00:00.000Z", "timestamp":"2011-01-15T00:00:00.000Z",
"placementish":"preferred", "placementish":"preferred",
"provider":"spot", "market":"spot",
"index":100.000000 "index":100.000000
}, },
{ {

View File

@ -4,7 +4,7 @@
}, },
{ {
"timestamp":"2011-01-13T00:00:00.000Z", "timestamp":"2011-01-13T00:00:00.000Z",
"provider":"spot", "market":"spot",
"quality":"automotive", "quality":"automotive",
"placement":"preferred", "placement":"preferred",
"placementish":["a", "preferred"], "placementish":["a", "preferred"],
@ -12,7 +12,7 @@
}, },
{ {
"timestamp":"2011-01-14T00:00:00.000Z", "timestamp":"2011-01-14T00:00:00.000Z",
"provider":"total_market", "market":"total_market",
"index":100.000000 "index":100.000000
}, },
{ {

View File

@ -1,14 +1,14 @@
[ [
{ {
"timestamp":"2011-01-13T00:00:00.000Z", "timestamp":"2011-01-13T00:00:00.000Z",
"provider":"total_market", "market":"total_market",
"placement":"preferred", "placement":"preferred",
"placementish":["h", "preferred"], "placementish":["h", "preferred"],
"index":100.000000 "index":100.000000
}, },
{ {
"timestamp":"2011-01-13T01:00:00.000Z", "timestamp":"2011-01-13T01:00:00.000Z",
"provider":"total_market", "market":"total_market",
"placement":"mezzanine", "placement":"mezzanine",
"placementish":["p", "preferred"], "placementish":["p", "preferred"],
"index":100.000000 "index":100.000000
@ -16,7 +16,7 @@
{ {
"timestamp":"2011-01-13T15:00:00.000Z", "timestamp":"2011-01-13T15:00:00.000Z",
"placementish":"preferred", "placementish":"preferred",
"provider":"spot", "market":"spot",
"index":100.000000 "index":100.000000
}, },
{ {

View File

@ -1,32 +1,32 @@
[ [
{ {
"timestamp":"2011-01-12T00:00:00.000Z", "timestamp":"2011-01-12T00:00:00.000Z",
"provider":"breakstuff", "market":"breakstuff",
"index":100.000000 "index":100.000000
}, },
{ {
"timestamp":"2011-01-14T00:00:00.000Z", "timestamp":"2011-01-14T00:00:00.000Z",
"provider":"breakstuff", "market":"breakstuff",
"index":100.000000 "index":100.000000
}, },
{ {
"timestamp":"2011-01-16T00:00:00.000Z", "timestamp":"2011-01-16T00:00:00.000Z",
"provider":"breakstuff", "market":"breakstuff",
"index":100.000000 "index":100.000000
}, },
{ {
"timestamp":"2011-01-17T00:00:00.000Z", "timestamp":"2011-01-17T00:00:00.000Z",
"provider":"breakstuff", "market":"breakstuff",
"index":100.000000 "index":100.000000
}, },
{ {
"timestamp":"2011-01-19T00:00:00.000Z", "timestamp":"2011-01-19T00:00:00.000Z",
"provider":"breakstuff", "market":"breakstuff",
"index":100.000000 "index":100.000000
}, },
{ {
"timestamp":"2011-01-21T00:00:00.000Z", "timestamp":"2011-01-21T00:00:00.000Z",
"provider":"breakstuff", "market":"breakstuff",
"index":100.000000 "index":100.000000
} }
] ]

View File

@ -1,12 +1,12 @@
[ [
{ {
"timestamp":"2011-01-13T00:00:00.000Z", "timestamp":"2011-01-13T00:00:00.000Z",
"provider":"breakstuff", "market":"breakstuff",
"index":100.000000 "index":100.000000
}, },
{ {
"timestamp":"2011-01-15T00:00:00.000Z", "timestamp":"2011-01-15T00:00:00.000Z",
"provider":"spot", "market":"spot",
"index":100.000000 "index":100.000000
} }
] ]

View File

@ -1,12 +1,12 @@
[ [
{ {
"timestamp":"2011-01-18T00:00:00.000Z", "timestamp":"2011-01-18T00:00:00.000Z",
"provider":"spot", "market":"spot",
"index":100.000000 "index":100.000000
}, },
{ {
"timestamp":"2011-01-20T00:00:00.000Z", "timestamp":"2011-01-20T00:00:00.000Z",
"provider":"spot", "market":"spot",
"index":100.000000 "index":100.000000
} }
] ]

View File

@ -4,7 +4,7 @@
}, },
{ {
"timestamp":"2011-01-12T00:00:00.000Z", "timestamp":"2011-01-12T00:00:00.000Z",
"provider":"spot", "market":"spot",
"quality":"automotive", "quality":"automotive",
"placement":"preferred", "placement":"preferred",
"placementish":["a", "preferred"], "placementish":["a", "preferred"],
@ -12,7 +12,7 @@
}, },
{ {
"timestamp":"2011-01-12T00:00:00.000Z", "timestamp":"2011-01-12T00:00:00.000Z",
"provider":"spot", "market":"spot",
"quality":"automotive", "quality":"automotive",
"index":100.000000 "index":100.000000
}, },
@ -23,14 +23,14 @@
}, },
{ {
"timestamp":"2011-01-13T00:00:00.000Z", "timestamp":"2011-01-13T00:00:00.000Z",
"provider":"total_market", "market":"total_market",
"placementish":["h", "preferred"], "placementish":["h", "preferred"],
"placement":"preferred", "placement":"preferred",
"index":100.000000 "index":100.000000
}, },
{ {
"timestamp":"2011-01-13T00:00:00.000Z", "timestamp":"2011-01-13T00:00:00.000Z",
"provider":"total_market", "market":"total_market",
"placementish":["p", "preferred"], "placementish":["p", "preferred"],
"quality":"business", "quality":"business",
"placement":"mezzanine", "placement":"mezzanine",
@ -39,7 +39,7 @@
{ {
"timestamp":"2011-01-12T00:00:00.000Z", "timestamp":"2011-01-12T00:00:00.000Z",
"placementish":"preferred", "placementish":"preferred",
"provider":"spot", "market":"spot",
"index":100.000000 "index":100.000000
}, },
{ {
@ -55,12 +55,12 @@
}, },
{ {
"timestamp":"2011-01-12T00:00:00.000Z", "timestamp":"2011-01-12T00:00:00.000Z",
"provider":"", "market":"",
"index":100.000000 "index":100.000000
}, },
{ {
"timestamp":"2011-01-12T00:00:00.000Z", "timestamp":"2011-01-12T00:00:00.000Z",
"provider":["", "spot"], "market":["", "spot"],
"index":100.000000 "index":100.000000
} }
] ]

View File

@ -6,14 +6,14 @@
}, },
{ {
"timestamp":"2011-01-13T00:00:00.000Z", "timestamp":"2011-01-13T00:00:00.000Z",
"provider":"total_market", "market":"total_market",
"placement":"preferred", "placement":"preferred",
"placementish":["h", "preferred"], "placementish":["h", "preferred"],
"index":100.000000 "index":100.000000
}, },
{ {
"timestamp":"2011-01-13T00:00:00.000Z", "timestamp":"2011-01-13T00:00:00.000Z",
"provider":"total_market", "market":"total_market",
"quality":"business", "quality":"business",
"placement":"mezzanine", "placement":"mezzanine",
"placementish":["p", "preferred"], "placementish":["p", "preferred"],
@ -22,7 +22,7 @@
{ {
"timestamp":"2011-01-12T00:00:00.000Z", "timestamp":"2011-01-12T00:00:00.000Z",
"placementish":"preferred", "placementish":"preferred",
"provider":"spot", "market":"spot",
"index":100.000000 "index":100.000000
}, },
{ {
@ -38,12 +38,12 @@
}, },
{ {
"timestamp":"2011-01-12T00:00:00.000Z", "timestamp":"2011-01-12T00:00:00.000Z",
"provider":"", "market":"",
"index":100.000000 "index":100.000000
}, },
{ {
"timestamp":"2011-01-12T00:00:00.000Z", "timestamp":"2011-01-12T00:00:00.000Z",
"provider":["", "spot"], "market":["", "spot"],
"index":100.000000 "index":100.000000
} }
] ]

View File

@ -4,7 +4,7 @@
}, },
{ {
"timestamp":"2011-01-12T00:00:00.000Z", "timestamp":"2011-01-12T00:00:00.000Z",
"provider":"spot", "market":"spot",
"quality":"automotive", "quality":"automotive",
"placement":"preferred", "placement":"preferred",
"placementish":["a", "preferred"], "placementish":["a", "preferred"],
@ -12,7 +12,7 @@
}, },
{ {
"timestamp":"2011-01-12T00:00:00.000Z", "timestamp":"2011-01-12T00:00:00.000Z",
"provider":"spot", "market":"spot",
"quality":"automotive", "quality":"automotive",
"index":100.000000 "index":100.000000
} }