Skip to content

Commit

Permalink
Remove supportsParallelCollection implementation for some aggs (elast…
Browse files Browse the repository at this point in the history
…ic#99654)

enable Cardinality, composite, nested and Frequent imters aggregations for concurrent execution.
  • Loading branch information
iverase authored Sep 19, 2023
1 parent bf8429b commit 61562f6
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,6 @@ public boolean supportsSampling() {
return true;
}

@Override
public boolean supportsParallelCollection() {
return false;
}

public CompositeAggregationBuilder(StreamInput in) throws IOException {
super(in);
int num = in.readVInt();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,6 @@ public BucketCardinality bucketCardinality() {
return BucketCardinality.MANY;
}

@Override
public boolean supportsParallelCollection() {
return false;
}

@Override
protected AggregationBuilder shallowCopy(AggregatorFactories.Builder factoriesBuilder, Map<String, Object> metaData) {
return new VariableWidthHistogramAggregationBuilder(this, factoriesBuilder, metaData);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@ public BucketCardinality bucketCardinality() {
return BucketCardinality.ONE;
}

@Override
public boolean supportsParallelCollection() {
return false;
}

@Override
protected AggregatorFactory doBuild(AggregationContext context, AggregatorFactory parent, Builder subFactoriesBuilder)
throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,6 @@ public boolean supportsSampling() {
return true;
}

@Override
public boolean supportsParallelCollection() {
return false;
}

@Override
protected boolean serializeTargetValueType(TransportVersion version) {
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,19 +334,19 @@ public void testSupportsParallelCollection() {
{
AggregatorFactories.Builder builder = new AggregatorFactories.Builder();
builder.addAggregator(new CardinalityAggregationBuilder("cardinality"));
assertFalse(builder.supportsParallelCollection());
assertTrue(builder.supportsParallelCollection());
}
{
AggregatorFactories.Builder builder = new AggregatorFactories.Builder();
builder.addAggregator(new NestedAggregationBuilder("nested", "path"));
assertFalse(builder.supportsParallelCollection());
assertTrue(builder.supportsParallelCollection());
}
{
AggregatorFactories.Builder builder = new AggregatorFactories.Builder();
builder.addAggregator(
new CompositeAggregationBuilder("composite", Collections.singletonList(new TermsValuesSourceBuilder("name")))
);
assertFalse(builder.supportsParallelCollection());
assertTrue(builder.supportsParallelCollection());
}
{
AggregatorFactories.Builder builder = new AggregatorFactories.Builder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,6 @@ public boolean supportsSampling() {
return true;
}

@Override
public boolean supportsParallelCollection() {
return false;
}

@Override
protected AggregationBuilder shallowCopy(Builder factoriesBuilder, Map<String, Object> metadata) {
return new FrequentItemSetsAggregationBuilder(name, fields, minimumSupport, minimumSetSize, size, filter, executionHint);
Expand Down

0 comments on commit 61562f6

Please sign in to comment.