Fix compilation in CumulativeCardinalityAggregatorTests
This commit is contained in:
parent
54a882ada9
commit
9ac85a4a2b
|
@ -116,12 +116,12 @@ public class CumulativeCardinalityAggregatorTests extends AggregatorTestCase {
|
|||
}
|
||||
|
||||
public void testParentValidations() throws IOException {
|
||||
ValuesSourceConfig<ValuesSource.Numeric> numericVS = new ValuesSourceConfig<>(ValuesSourceType.NUMERIC);
|
||||
ValuesSourceConfig<ValuesSource> valuesSourceConfig = new ValuesSourceConfig<>(ValuesSourceType.NUMERIC);
|
||||
|
||||
// Histogram
|
||||
Set<PipelineAggregationBuilder> aggBuilders = new HashSet<>();
|
||||
aggBuilders.add(new CumulativeCardinalityPipelineAggregationBuilder("cumulative_card", "sum"));
|
||||
AggregatorFactory parent = new HistogramAggregatorFactory("name", numericVS, 0.0d, 0.0d,
|
||||
AggregatorFactory parent = new HistogramAggregatorFactory("name", valuesSourceConfig, 0.0d, 0.0d,
|
||||
mock(InternalOrder.class), false, 0L, 0.0d, 1.0d, mock(SearchContext.class), null,
|
||||
new AggregatorFactories.Builder(), Collections.emptyMap());
|
||||
CumulativeCardinalityPipelineAggregationBuilder builder
|
||||
|
@ -131,7 +131,7 @@ public class CumulativeCardinalityAggregatorTests extends AggregatorTestCase {
|
|||
// Date Histogram
|
||||
aggBuilders.clear();
|
||||
aggBuilders.add(new CumulativeCardinalityPipelineAggregationBuilder("cumulative_card", "sum"));
|
||||
parent = new DateHistogramAggregatorFactory("name", numericVS, 0L,
|
||||
parent = new DateHistogramAggregatorFactory("name", valuesSourceConfig, 0L,
|
||||
mock(InternalOrder.class), false, 0L, mock(Rounding.class), mock(Rounding.class),
|
||||
mock(ExtendedBounds.class), mock(SearchContext.class), mock(AggregatorFactory.class),
|
||||
new AggregatorFactories.Builder(), Collections.emptyMap());
|
||||
|
@ -139,6 +139,7 @@ public class CumulativeCardinalityAggregatorTests extends AggregatorTestCase {
|
|||
builder.validate(parent, Collections.emptySet(), aggBuilders);
|
||||
|
||||
// Auto Date Histogram
|
||||
ValuesSourceConfig<ValuesSource.Numeric> numericVS = new ValuesSourceConfig<>(ValuesSourceType.NUMERIC);
|
||||
aggBuilders.clear();
|
||||
aggBuilders.add(new CumulativeCardinalityPipelineAggregationBuilder("cumulative_card", "sum"));
|
||||
AutoDateHistogramAggregationBuilder.RoundingInfo[] roundings = new AutoDateHistogramAggregationBuilder.RoundingInfo[1];
|
||||
|
@ -229,21 +230,22 @@ public class CumulativeCardinalityAggregatorTests extends AggregatorTestCase {
|
|||
|
||||
private static AggregatorFactory getRandomSequentiallyOrderedParentAgg() throws IOException {
|
||||
AggregatorFactory factory;
|
||||
ValuesSourceConfig<ValuesSource.Numeric> numericVS = new ValuesSourceConfig<>(ValuesSourceType.NUMERIC);
|
||||
ValuesSourceConfig<ValuesSource> valuesSourceConfig = new ValuesSourceConfig<>(ValuesSourceType.NUMERIC);
|
||||
switch (randomIntBetween(0, 2)) {
|
||||
case 0:
|
||||
factory = new HistogramAggregatorFactory("name", numericVS, 0.0d, 0.0d,
|
||||
factory = new HistogramAggregatorFactory("name", valuesSourceConfig, 0.0d, 0.0d,
|
||||
mock(InternalOrder.class), false, 0L, 0.0d, 1.0d, mock(SearchContext.class), null,
|
||||
new AggregatorFactories.Builder(), Collections.emptyMap());
|
||||
break;
|
||||
case 1:
|
||||
factory = new DateHistogramAggregatorFactory("name", numericVS, 0L,
|
||||
factory = new DateHistogramAggregatorFactory("name", valuesSourceConfig, 0L,
|
||||
mock(InternalOrder.class), false, 0L, mock(Rounding.class), mock(Rounding.class),
|
||||
mock(ExtendedBounds.class), mock(SearchContext.class), mock(AggregatorFactory.class),
|
||||
new AggregatorFactories.Builder(), Collections.emptyMap());
|
||||
break;
|
||||
case 2:
|
||||
default:
|
||||
ValuesSourceConfig<ValuesSource.Numeric> numericVS = new ValuesSourceConfig<>(ValuesSourceType.NUMERIC);
|
||||
AutoDateHistogramAggregationBuilder.RoundingInfo[] roundings = new AutoDateHistogramAggregationBuilder.RoundingInfo[1];
|
||||
factory = new AutoDateHistogramAggregatorFactory("name", numericVS,
|
||||
1, roundings,
|
||||
|
|
Loading…
Reference in New Issue