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

[Backport 1.x] Add valuesField in PercentilesAggregationBuilder streamInput constructor #2389

Merged
merged 1 commit into from
Mar 7, 2022
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 @@ -163,7 +163,7 @@ public static <T extends AbstractPercentilesAggregationBuilder<T>> ConstructingO
this.valuesField = clone.valuesField;
}

AbstractPercentilesAggregationBuilder(StreamInput in) throws IOException {
AbstractPercentilesAggregationBuilder(StreamInput in, ParseField valuesField) throws IOException {
super(in);
values = in.readDoubleArray();
keyed = in.readBoolean();
Expand All @@ -175,6 +175,7 @@ public static <T extends AbstractPercentilesAggregationBuilder<T>> ConstructingO
PercentilesMethod method = PercentilesMethod.readFromStream(in);
percentilesConfig = PercentilesConfig.fromLegacy(method, compression, numberOfSignificantValueDigits);
}
this.valuesField = valuesField;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ private PercentileRanksAggregationBuilder(String name, double[] values, Percenti
}

public PercentileRanksAggregationBuilder(StreamInput in) throws IOException {
super(in);
super(in, VALUES_FIELD);
}

private PercentileRanksAggregationBuilder(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static void registerAggregators(ValuesSourceRegistry.Builder builder) {
}

public PercentilesAggregationBuilder(StreamInput in) throws IOException {
super(in);
super(in, PERCENTS_FIELD);
}

public static AggregationBuilder parse(String aggregationName, XContentParser parser) throws IOException {
Expand Down