Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct implemented interface of ParsedReverseNested #35455

Merged
merged 2 commits into from
Nov 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

import java.io.IOException;

public class ParsedReverseNested extends ParsedSingleBucketAggregation implements Nested {
public class ParsedReverseNested extends ParsedSingleBucketAggregation implements ReverseNested {

@Override
public String getType() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@
import org.elasticsearch.common.io.stream.Writeable.Reader;
import org.elasticsearch.search.aggregations.InternalAggregations;
import org.elasticsearch.search.aggregations.InternalSingleBucketAggregationTestCase;
import org.elasticsearch.search.aggregations.ParsedAggregation;
import org.elasticsearch.search.aggregations.bucket.ParsedSingleBucketAggregation;
import org.elasticsearch.search.aggregations.pipeline.PipelineAggregator;

import java.io.IOException;
import java.util.List;
import java.util.Map;

Expand All @@ -49,4 +51,10 @@ protected Reader<InternalNested> instanceReader() {
protected Class<? extends ParsedSingleBucketAggregation> implementationClass() {
return ParsedNested.class;
}

@Override
protected void assertFromXContent(InternalNested aggregation, ParsedAggregation parsedAggregation) throws IOException {
super.assertFromXContent(aggregation, parsedAggregation);
assertTrue(parsedAggregation instanceof Nested);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@
import org.elasticsearch.common.io.stream.Writeable.Reader;
import org.elasticsearch.search.aggregations.InternalAggregations;
import org.elasticsearch.search.aggregations.InternalSingleBucketAggregationTestCase;
import org.elasticsearch.search.aggregations.ParsedAggregation;
import org.elasticsearch.search.aggregations.bucket.ParsedSingleBucketAggregation;
import org.elasticsearch.search.aggregations.pipeline.PipelineAggregator;

import java.io.IOException;
import java.util.List;
import java.util.Map;

Expand All @@ -49,4 +51,10 @@ protected Reader<InternalReverseNested> instanceReader() {
protected Class<? extends ParsedSingleBucketAggregation> implementationClass() {
return ParsedReverseNested.class;
}

@Override
protected void assertFromXContent(InternalReverseNested aggregation, ParsedAggregation parsedAggregation) throws IOException {
super.assertFromXContent(aggregation, parsedAggregation);
assertTrue(parsedAggregation instanceof ReverseNested);
}
}