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

Remove Int and Double boxing #113

Closed
rakyll opened this issue Aug 15, 2014 · 5 comments
Closed

Remove Int and Double boxing #113

rakyll opened this issue Aug 15, 2014 · 5 comments
Assignees
Labels
core 🚨 This issue needs some love. triage me I really want to be triaged.
Milestone

Comments

@rakyll
Copy link
Contributor

rakyll commented Aug 15, 2014

We don't seem to need to provide boxing to be more precise. Current way of detecting double numbers seem to be working fine. I want to remove Int and Double custom types for cleanup.

Does it sound good?

@rakyll rakyll added this to the M1: core, datastore & storage milestone Aug 15, 2014
@silvolu
Copy link
Contributor

silvolu commented Aug 15, 2014

SGTM.

@stephenplusplus
Copy link
Contributor

Isn't boxing them the only way we do the detection? https://github.com/GoogleCloudPlatform/gcloud-node/blob/master/lib/datastore/entity.js#L208-215:

if (v instanceof Int) {
  p.integerValue = v.get();
  return p;
}
if (v instanceof Double) {
  p.doubleValue = v.get();
  return p;
}

If we remove them, how would a user specify they want a double?

@rakyll
Copy link
Contributor Author

rakyll commented Aug 15, 2014

There would be no explicit way to force a field to be double. If it's not a floating point number, we will persist it as uint64 in the backend.

I'm wondering about the impact it has to the backend and indexing. cc/ @pcostell

@pcostell
Copy link
Contributor

Unfortunately indexing uses property type to determine order: https://developers.google.com/appengine/docs/java/datastore/indexes#Java_Properties_with_mixed_value_types

When two entities have properties of the same name but different value types, an index of the property sorts the entities first by value type and then by a secondary ordering appropriate to each type. For example, if two entities each have a property named age, one with an integer value and one with a string value, the entity with the integer value always precedes the one with the string value when sorted by the age property, regardless of the property values themselves.

@rakyll
Copy link
Contributor Author

rakyll commented Aug 15, 2014

Ah, an immediate WONTFIX then. Thanks.

@rakyll rakyll closed this as completed Aug 15, 2014
@jgeewax jgeewax added the core label Feb 2, 2015
@jgeewax jgeewax modified the milestones: M1: core, datastore & storage, Core Stable Feb 2, 2015
@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Apr 6, 2020
sofisl pushed a commit that referenced this issue Sep 27, 2022
sofisl pushed a commit that referenced this issue Oct 11, 2022
sofisl pushed a commit that referenced this issue Oct 13, 2022
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/4de22315-84b1-493d-8da2-dfa7688128f5/targets

- [ ] To automatically regenerate this PR, check this box.

Source-Link: googleapis/synthtool@94421c4
sofisl pushed a commit that referenced this issue Oct 13, 2022
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/ba2d388f-b3b2-4ad7-a163-0c6b4d86894f/targets

- [ ] To automatically regenerate this PR, check this box.

Source-Link: googleapis/synthtool@05de3e1
sofisl pushed a commit that referenced this issue Nov 11, 2022
* test: use fully qualified request type name in tests

PiperOrigin-RevId: 475685359

Source-Link: googleapis/googleapis@7a12973

Source-Link: googleapis/googleapis-gen@370c729
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzcwYzcyOWUyYmEwNjJhMTY3NDQ5YzI3ODgyYmE1ZjM3OWM1YzM0ZCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
sofisl pushed a commit that referenced this issue Nov 11, 2022
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [jsdoc-fresh](https://togithub.com/googleapis/jsdoc-fresh) | [`^1.0.2` -> `^2.0.0`](https://renovatebot.com/diffs/npm/jsdoc-fresh/1.1.1/2.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/compatibility-slim/1.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/confidence-slim/1.1.1)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>googleapis/jsdoc-fresh</summary>

### [`v2.0.0`](https://togithub.com/googleapis/jsdoc-fresh/blob/HEAD/CHANGELOG.md#&#8203;200-httpsgithubcomgoogleapisjsdoc-freshcomparev111v200-2022-05-18)

[Compare Source](https://togithub.com/googleapis/jsdoc-fresh/compare/v1.1.1...v2.0.0)

##### ⚠ BREAKING CHANGES

-   update library to use Node 12 ([#&#8203;108](https://togithub.com/googleapis/jsdoc-fresh/issues/108))

##### Build System

-   update library to use Node 12 ([#&#8203;108](https://togithub.com/googleapis/jsdoc-fresh/issues/108)) ([e61c223](https://togithub.com/googleapis/jsdoc-fresh/commit/e61c2238db8900e339e5fe7fb8aea09642290182))

##### [1.1.1](https://www.github.com/googleapis/jsdoc-fresh/compare/v1.1.0...v1.1.1) (2021-08-11)

##### Bug Fixes

-   **build:** migrate to using main branch ([#&#8203;83](https://www.togithub.com/googleapis/jsdoc-fresh/issues/83)) ([9474adb](https://www.github.com/googleapis/jsdoc-fresh/commit/9474adbf0d559d319ff207397ba2be6b557999ac))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

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

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-org-policy).
sofisl pushed a commit that referenced this issue Nov 16, 2022
sofisl pushed a commit that referenced this issue Nov 16, 2022
🤖 I have created a release \*beep\* \*boop\*
---
## [1.4.0](https://www.github.com/googleapis/nodejs-retail/compare/v1.3.0...v1.4.0) (2021-11-04)


### Features

* Add local inventory ingestion APIs to product service in alpha channel ([#112](https://www.github.com/googleapis/nodejs-retail/issues/112)) ([8387781](https://www.github.com/googleapis/nodejs-retail/commit/8387781135ddb02b43af222bbbd3d5852e0147d3))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
sofisl pushed a commit that referenced this issue Jan 10, 2023
* Release v0.8.1

* update samples/package.json ver

* upgrade to v0.9.0 instead

* Update CHANGELOG.md
sofisl pushed a commit that referenced this issue Jan 17, 2023
* gen: synth.py v2

* gen: synth.py excludes src/index.js for multi-version
sofisl pushed a commit that referenced this issue Jan 24, 2023
sofisl pushed a commit that referenced this issue Jan 25, 2023
sofisl pushed a commit that referenced this issue Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core 🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

6 participants