GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Added Generic getNumber Method to AggregationResult by st4sik · Pull Request #1861 · googleapis/java-datastore

This repository was archived by the owner on Feb 24, 2026. It is now read-only.

Conversation

@st4sik

@st4sik st4sik commented May 19, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

feat: add getNumber to AggregationResult (#1851)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@st4sik
st4sik requested review from a team May 19, 2025 15:12
@google-cla

google-cla Bot commented May 19, 2025

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@product-auto-label product-auto-label Bot added size: s Pull request size is small. api: datastore Issues related to the googleapis/java-datastore API. labels May 19, 2025
@st4sik
st4sik force-pushed the aggregation-getnumber branch 4 times, most recently from cfefabd to 388905c Compare May 19, 2025 15:38
@cindy-peng

cindy-peng commented May 20, 2025

Copy link
Copy Markdown
Contributor

/gcbrun

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cindy-peng
cindy-peng reviewed May 23, 2025
View reviewed changes
Comment thread google-cloud-datastore/src/test/java/com/google/cloud/datastore/AggregationResultTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@st4sik
st4sik force-pushed the aggregation-getnumber branch from 388905c to 7921e73 Compare May 27, 2025 19:29
@st4sik @st4sikR
feat: add getNumber to AggregationResult (googleapis#1851)
0175a42
@st4sik
st4sik force-pushed the aggregation-getnumber branch from 7921e73 to 0175a42 Compare May 27, 2025 19:33
@st4sik

st4sik commented May 27, 2025

Copy link
Copy Markdown
Contributor Author

@cindy-peng
I didn't explicitly write 50L in the test because the method integralValue in com.google.common.truth.Subject already handles the conversion.

Here's the relevant code:

private static long integralValue(Object o) {
        if (o instanceof Character) {
            return (long)(Character)o;
        } else if (o instanceof Number) {
            return ((Number)o).longValue();
        } else {
            throw new AssertionError(o + " must be either a Character or a Number.");
        }
    }

As you can see, if the input is a Number, it automatically gets converted to long using longValue().
So even if I pass 50 (an Integer), it will be treated as 50L internally.

cindy-peng reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cindy-peng

cindy-peng commented May 27, 2025

Copy link
Copy Markdown
Contributor

/gcbrun

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cindy-peng
cindy-peng approved these changes May 28, 2025
View reviewed changes
@cindy-peng cindy-peng added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 28, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 28, 2025
@cindy-peng
cindy-peng merged commit b9c2c3f into googleapis:main May 29, 2025
@st4sik

st4sik commented May 29, 2025

Copy link
Copy Markdown
Contributor Author

@cindy-peng

thanks a lot.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

lqiu96 pushed a commit that referenced this pull request Jun 5, 2025
@st4sik @lqiu96
feat: add getNumber to AggregationResult (#1851) (#1861)
3d1240a
@release-please release-please Bot mentioned this pull request Jun 6, 2025
chore(main): release 2.29.0 #1866
Merged
gcf-merge-on-green Bot pushed a commit that referenced this pull request Jun 6, 2025
@release-please
chore(main): release 2.29.0 (#1866)
50ddc66
🤖 I have created a release *beep* *boop*
---


## [2.29.0](https://togithub.com/googleapis/java-datastore/compare/v2.28.2...v2.29.0) (2025-06-06)


### Features

* Add getNumber to AggregationResult (https://togithub.com/googleapis/java-datastore/issues/1851) ([#1861](https://togithub.com/googleapis/java-datastore/issues/1861)) ([b9c2c3f](https://togithub.com/googleapis/java-datastore/commit/b9c2c3ff775f7123d701ccacff9bd2ea3718243b))


### Bug Fixes

* Remove 500 char path name limit ([#1865](https://togithub.com/googleapis/java-datastore/issues/1865)) ([1097175](https://togithub.com/googleapis/java-datastore/commit/10971752310d8b1794c8e77041b582707142b328))


### Dependencies

* Update dependency org.easymock:easymock to v5.6.0 ([#1858](https://togithub.com/googleapis/java-datastore/issues/1858)) ([acc1513](https://togithub.com/googleapis/java-datastore/commit/acc1513ad90e8da6743e618322bae075bac4ac46))

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
svc-squareup-copybara pushed a commit to cashapp/misk that referenced this pull request Jun 6, 2025
@github-cash-renovate-jvm-2 @svc-squareup-copybara
This PR contains the following updates:
151e9a5
| Package | Type | Package file | Manager | Update | Change |
|---|---|---|---|---|---|
|
[com.google.cloud:google-cloud-logging](https://github.com/googleapis/java-logging)
| dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`3.22.4` -> `3.22.5` |
|
[com.google.cloud:google-cloud-datastore](https://github.com/googleapis/java-datastore)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`2.28.2` -> `2.29.0` |
| [software.amazon.awssdk:sdk-core](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.31.57` -> `2.31.58` |
| [software.amazon.awssdk:sqs](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.31.57` -> `2.31.58` |
|
[software.amazon.awssdk:dynamodb-enhanced](https://aws.amazon.com/sdkforjava)
| dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.31.57` -> `2.31.58` |
| [software.amazon.awssdk:dynamodb](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.31.57` -> `2.31.58` |
| [software.amazon.awssdk:aws-core](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.31.57` -> `2.31.58` |
| [software.amazon.awssdk:bom](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.31.57` -> `2.31.58` |
| [software.amazon.awssdk:auth](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.31.57` -> `2.31.58` |

---

### Release Notes

<details>
<summary>googleapis/java-logging
(com.google.cloud:google-cloud-logging)</summary>

###
[`v3.22.5`](https://github.com/googleapis/java-logging/blob/HEAD/CHANGELOG.md#3225-2025-06-05)

##### Bug Fixes

- **deps:** Update the Java code generator (gapic-generator-java) to
2.59.0
([f2362fb](googleapis/java-logging@f2362fb))

##### Dependencies

- Update dependency com.google.cloud:sdk-platform-java-config to v3.49.0
([#&#8203;1813](googleapis/java-logging#1813))
([c15da84](googleapis/java-logging@c15da84))

</details>

<details>
<summary>googleapis/java-datastore
(com.google.cloud:google-cloud-datastore)</summary>

###
[`v2.29.0`](https://github.com/googleapis/java-datastore/blob/HEAD/CHANGELOG.md#2290-2025-06-06)

##### Features

- Add getNumber to AggregationResult
(googleapis/java-datastore#1851)
([#&#8203;1861](googleapis/java-datastore#1861))
([b9c2c3f](googleapis/java-datastore@b9c2c3f))

##### Bug Fixes

- Remove 500 char path name limit
([#&#8203;1865](googleapis/java-datastore#1865))
([1097175](googleapis/java-datastore@1097175))

##### Dependencies

- Update dependency org.easymock:easymock to v5.6.0
([#&#8203;1858](googleapis/java-datastore#1858))
([acc1513](googleapis/java-datastore@acc1513))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 6pm every weekday,before 2am
every weekday" in timezone Australia/Melbourne, Automerge - At any time
(no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

GitOrigin-RevId: f1129aae97972eef0c4a3934c7b16fad67f6547d
@jinseopkim0 jinseopkim0 mentioned this pull request Nov 11, 2025
Add Generic getNumber Method to AggregationResult #1851
Closed
@release-please release-please Bot mentioned this pull request Dec 15, 2025
chore(protobuf-4.x-rc): release 2.34.0-rc1 #2004
Merged
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

1 more reviewer
@cindy-peng cindy-peng cindy-peng approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

api: datastore Issues related to the googleapis/java-datastore API. size: s Pull request size is small.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@st4sik @cindy-peng @yoshi-kokoro
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.