Title: Datastore: projection queries do not return the same number of records. · Issue #9600 · googleapis/google-cloud-python · GitHub
Open Graph Title: Datastore: projection queries do not return the same number of records. · Issue #9600 · googleapis/google-cloud-python
X Title: Datastore: projection queries do not return the same number of records. · Issue #9600 · googleapis/google-cloud-python
Description: OS: ubuntu 19.04 Python: 3.7.3 Client library: google-cloud-datastore 1.10.0 Steps to reproduce Import data into datastore (fairly big records with many fields, actually datex 2 compatible data for situations) Query all data and count th...
Open Graph Description: OS: ubuntu 19.04 Python: 3.7.3 Client library: google-cloud-datastore 1.10.0 Steps to reproduce Import data into datastore (fairly big records with many fields, actually datex 2 compatible data for...
X Description: OS: ubuntu 19.04 Python: 3.7.3 Client library: google-cloud-datastore 1.10.0 Steps to reproduce Import data into datastore (fairly big records with many fields, actually datex 2 compatible data for...
Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/9600
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Datastore: projection queries do not return the same number of records.","articleBody":"OS: ubuntu 19.04\r\nPython: 3.7.3\r\nClient library: google-cloud-datastore 1.10.0\r\n\r\n#### Steps to reproduce\r\n\r\n 1. Import data into datastore (fairly big records with many fields, actually datex 2 compatible data for situations)\r\n 2. Query all data and count the records.\r\n 3. Make a projection query for 3-4 of the fields\r\n 4. Create the suggested index.\r\n 5. Run the projection query and count the records.\r\n\r\nI seem to get only 25% of the records using the projection query, which I cant understand, for the same filter and options only by using the exact same settings as the first query.\r\n\r\n#### Code example\r\n\r\n```python\r\n query = client.query(kind='TestData', namespace='TestNamespace1')\r\n data = query.fetch()\r\n run1 = len(list(data))\r\n query = client.query(kind='TestData', namespace='TestNamespace1')\r\n query.projection = ['field1', 'field2', 'field3', 'field4']\r\n data = query.fetch()\r\n run2 = len(list(data))\r\n print('%s should be like %s' % (run1, run2))\r\n```\r\n\r\n#### Stack trace\r\nYou dont get stacktrace outside of the initial one that gives you the hint for the correct index to create in the database. I created the suggested one.\r\n\r\nAll fields outside of 1 is string or number one is lat long position using the datastore type.\r\n\r\nConsidering none projection query runs in 6 seconds and returns a result set of 18Mb I would prefer to get this working with the projection query coupled with gzip which run in 200ms where the result set should be 54Kb :)\r\n","author":{"url":"https://github.com/klausmyrseth","@type":"Person","name":"klausmyrseth"},"datePublished":"2019-11-05T12:58:38Z","url":"https://github.com/googleapis/google-cloud-python/issues/9600"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:605e5eea-c416-8db0-7fa2-69ec97e606ba |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BFCC:9042A:14A488:1C14D5:6AFE15DB |
| html-safe-nonce | 48ee73cc17fd5356d2107198c54d224be39c140873b12e5389c231d7a66a4d88 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRkNDOjkwNDJBOjE0QTQ4ODoxQzE0RDU6NkFGRTE1REIiLCJ2aXNpdG9yX2lkIjoiMTExNDc3Mzk3NjI0NTk5OTA2OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 62a17f0c925ee9d12b32ad4e59474ced69a0555de053cc2b8f72f749abb4e596 |
| hovercard-subject-tag | issue:517757383 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-python/9600/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ac0b64a3c7ce7e46af8b6baf03e240e888d3747178a1a21679679e98d011f9bf/googleapis/google-cloud-python/issues/9600 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ac0b64a3c7ce7e46af8b6baf03e240e888d3747178a1a21679679e98d011f9bf/googleapis/google-cloud-python/issues/9600 |
| og:image:alt | OS: ubuntu 19.04 Python: 3.7.3 Client library: google-cloud-datastore 1.10.0 Steps to reproduce Import data into datastore (fairly big records with many fields, actually datex 2 compatible data for... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | klausmyrseth |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3cd8a1d79ccbf9aecac62781f79072482a49047fb982b8c9e2ad4aca8bf6a9af |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-python git https://github.com/googleapis/google-cloud-python.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 16316451 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16316451 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 05539640a34afe6142a519483d78ddd766a1304a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width