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

feat(spanner/spannertest): support AVG aggregation function #3286

Merged

Conversation

sryoya
Copy link
Contributor

@sryoya sryoya commented Nov 27, 2020

Fixes #3285

Sorry for creating PR without waiting for the response to the above issue 😅

@sryoya sryoya requested review from skuruppu and a team as code owners November 27, 2020 16:19
@product-auto-label product-auto-label bot added the api: spanner Issues related to the Spanner API. label Nov 27, 2020
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Nov 27, 2020
Copy link
Contributor

@dsymonds dsymonds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, but just needs to be pared back.

spanner/spannertest/integration_test.go Show resolved Hide resolved
spanner/spannertest/funcs.go Outdated Show resolved Hide resolved
@@ -135,6 +135,7 @@ var funcs = map[string]bool{
"MAX": true,
"MIN": true,
"SUM": true,
"AVG": true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep these in alphabetical order.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't notice the order rule, thanks.
6445399

@@ -111,6 +111,20 @@ func TestParseQuery(t *testing.T) {
},
},
},
{`SELECT AVG(PointsScored) AS total_points, FirstName, LastName AS surname FROM PlayerStats GROUP BY FirstName, LastName`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this test case is really not needed.

Copy link
Contributor Author

@sryoya sryoya Dec 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, removed.
8b733f1

@sryoya
Copy link
Contributor Author

sryoya commented Dec 1, 2020

@dsymonds Thanks for your review. I updated the points you commented. Can you check them again?

@sryoya sryoya requested review from dsymonds and removed request for a team December 1, 2020 01:09
dsymonds
dsymonds previously approved these changes Dec 1, 2020
Copy link
Contributor

@dsymonds dsymonds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dsymonds dsymonds added automerge Merge the pull request once unit tests and other checks pass. automerge: exact Summon MOG for automerging, but approvals need to be against the latest commit and removed automerge Merge the pull request once unit tests and other checks pass. labels Dec 1, 2020
@gcf-merge-on-green gcf-merge-on-green bot dismissed dsymonds’s stale review December 1, 2020 23:38

This review does not reference the most recent commit, and you are using the secure version of merge-on-green. Please re-review the most recent commit.

@dsymonds dsymonds added automerge Merge the pull request once unit tests and other checks pass. and removed automerge: exact Summon MOG for automerging, but approvals need to be against the latest commit labels Dec 2, 2020
@dsymonds dsymonds added the kokoro:run Add this label to force Kokoro to re-run the tests. label Dec 2, 2020
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Dec 2, 2020
@gcf-merge-on-green gcf-merge-on-green bot merged commit 4788415 into googleapis:master Dec 2, 2020
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Dec 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the Spanner API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

spannertest: Support AVG
3 participants