-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix #3317 and #3322 add after_key support to composite aggregation re… #3367
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left some comments.
Looking to address, to merge into 6.3
@@ -34,6 +34,20 @@ public class MultiBucketAggregate<TBucket> : IAggregate | |||
public IReadOnlyCollection<TBucket> Buckets { get; set; } = EmptyReadOnly<TBucket>.Collection; | |||
} | |||
|
|||
public class CompositeBucketAggregate : IAggregate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this were to derive from MultiBucketAggregate<CompositeBucket>
, I think binary compatibility would be maintained.
/// If all buckets are filtered/removed by a pipeline aggregation, the after_key will contain the last bucket before filtering. | ||
/// </summary> | ||
/// <remarks> Valid for Elasticsearch 6.3.0+ </remarks> | ||
public IReadOnlyDictionary<string, object> AfterKey { get; set; } = EmptyReadOnly<string, object>.Dictionary; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CompositeKey
?
await this.AssertOnAllResponses(r => r.ShouldHaveExpectedIsValid(this.ExpectIsValid)); | ||
|
||
[I] public async Task ReturnsExpectedResponse() => await this.AssertOnAllResponses(ExpectResponse); | ||
[I] public virtual async Task ReturnsExpectedResponse() => await this.AssertOnAllResponses(ExpectResponse); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't look like this needs to be virtual?
await this.AssertOnAllResponses(r => r.ApiCall.HttpStatusCode.Should().Be(this.ExpectStatusCode)); | ||
|
||
[I] public async Task ReturnsExpectedIsValid() => | ||
[I] public virtual async Task ReturnsExpectedIsValid() => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't look like this needs to be virtual?
@@ -32,13 +32,13 @@ public abstract class ApiIntegrationTestBase<TCluster, TResponse, TInterface, TD | |||
public override IElasticClient Client => this.Cluster.Client; | |||
protected override TInitializer Initializer => Activator.CreateInstance<TInitializer>(); | |||
|
|||
[I] public async Task ReturnsExpectedStatusCode() => | |||
[I] public virtual async Task ReturnsExpectedStatusCode() => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't look like this needs to be virtual?
#3367) Fix #3317 and #3322 add after_key support to composite aggregation result and allow format to be set for date histogram composite source Introduce CompositeBucketAggregate derived from MultiBucketAggregate<CompositeBucket> to introduce AfterKey property. Bump dotnet-xunit .NET tool to official release
#3367) Fix #3317 and #3322 add after_key support to composite aggregation result and allow format to be set for date histogram composite source Introduce CompositeBucketAggregate derived from MultiBucketAggregate<CompositeBucket> to introduce AfterKey property. Bump dotnet-xunit .NET tool to official release
#3367) Fix #3317 and #3322 add after_key support to composite aggregation result and allow format to be set for date histogram composite source Introduce CompositeBucketAggregate derived from MultiBucketAggregate<CompositeBucket> to introduce AfterKey property. Bump dotnet-xunit .NET tool to official release (cherry picked from commit 69775d6)
…sult and allow format to be set for date histogram composite source