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

Fix #3317 and #3322 add after_key support to composite aggregation re… #3367

Merged
merged 2 commits into from
Aug 20, 2018

Conversation

Mpdreamz
Copy link
Member

…sult and allow format to be set for date histogram composite source

…sult and allow format to be set for date histogram composite source
Copy link
Contributor

@russcam russcam left a 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
Copy link
Contributor

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;
Copy link
Contributor

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);
Copy link
Contributor

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() =>
Copy link
Contributor

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() =>
Copy link
Contributor

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?

@russcam russcam merged commit 3a9e837 into 6.3 Aug 20, 2018
@russcam russcam deleted the feature/composite-improvements-6.3 branch August 24, 2018 06:47
Mpdreamz added a commit that referenced this pull request Sep 3, 2018
#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
Mpdreamz added a commit that referenced this pull request Sep 3, 2018
#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
Mpdreamz added a commit that referenced this pull request Sep 6, 2018
#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)
@Mpdreamz Mpdreamz mentioned this pull request Sep 10, 2018
45 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants