Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Issue 1336443003: Implement projection queries correctly. (Closed)

Created:
5 years, 3 months ago by iannucci
Modified:
5 years, 3 months ago
CC:
chromium-reviews, infra-reviews+luci-gae_chromium.org
Base URL:
https://github.com/luci/gae.git@master
Target Ref:
refs/heads/master
Project:
luci-gae
Visibility:
Public.

Description

Implement projection queries correctly. * Add Project and ForIndex to Property in service/datastore * Remove PTBoolFalse/PTBoolTrue silliness (now just PTBool) * Remove ByteSlice silliness (now []byte behaves exactly like string w.r.t. indexing. If you don't want it indexed, put `gae:",noindex"` on it.) * Make indexes index 'underlying' types. e.g. PTTime is not distinguished from PTInt in the index, nor are the various byte sequence types. * Make impl/prod correctly extract data from internal datastoreIndex objects when doing projection queries. This allows doing a projection into []PropertyMap. Since all data is bussed internally as PropertyMap (instead of crazy PropertyLoadSaver implementations), this is required to make projection queries work. I'm pretty confident that this won't break, however, as it's all derived from protobufs which are extremely unlikely to change. To make this better, we'd have to implement the protobuf protocol directly in luci/gae instead of routing through the SDK. Not as absurd as it sounds, but definitely out of scope for this CL :). * Include extremely basic test for impl/prod using aetest. This test takes 12s to run on my laptop. *sigh*. R=dnj@chromium.org, estaab@chromium.org, maruel@chromium.org, tandrii@chromium.org, vadimsh@chromium.org BUG=https://github.com/luci/gae/issues/1 Committed: https://github.com/luci/gae/commit/9ce8b9442816469d8c4e3c53572d52aaf4d7378e

Patch Set 1 #

Total comments: 15

Patch Set 2 : typo #

Patch Set 3 : fix doc #

Total comments: 11

Patch Set 4 : fix comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+533 lines, -212 lines) Patch
M impl/memory/datastore_index.go View 1 chunk +22 lines, -13 lines 0 comments Download
M impl/memory/datastore_index_test.go View 3 chunks +14 lines, -13 lines 0 comments Download
M impl/memory/datastore_query_execution_test.go View 3 chunks +23 lines, -0 lines 0 comments Download
M impl/memory/datastore_query_test.go View 1 chunk +1 line, -1 line 0 comments Download
M impl/prod/raw_datastore_type_converter.go View 1 4 chunks +97 lines, -11 lines 0 comments Download
A impl/prod/raw_datastore_type_converter_test.go View 1 chunk +152 lines, -0 lines 0 comments Download
M service/datastore/pls_impl.go View 3 chunks +38 lines, -60 lines 0 comments Download
M service/datastore/pls_test.go View 8 chunks +18 lines, -37 lines 0 comments Download
M service/datastore/properties.go View 1 2 3 7 chunks +149 lines, -40 lines 0 comments Download
M service/datastore/properties_test.go View 2 chunks +2 lines, -9 lines 0 comments Download
M service/datastore/reflect.go View 1 chunk +0 lines, -1 line 0 comments Download
M service/datastore/serialize/serialize.go View 1 2 3 5 chunks +17 lines, -23 lines 0 comments Download
M service/datastore/serialize/serialize_test.go View 1 chunk +0 lines, -1 line 0 comments Download
M service/datastore/types.go View 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 11 (3 generated)
iannucci
5 years, 3 months ago (2015-09-10 03:43:46 UTC) #1
iannucci
PTAL (with self-comments!) https://codereview.chromium.org/1336443003/diff/1/impl/memory/datastore_index.go File impl/memory/datastore_index.go (right): https://codereview.chromium.org/1336443003/diff/1/impl/memory/datastore_index.go#newcode63 impl/memory/datastore_index.go:63: func serializeRow(vals []ds.Property) serializedPvals { This ...
5 years, 3 months ago (2015-09-10 03:56:58 UTC) #2
dnj (Google)
Generally lgtm, I really really really don't like the reflection approach, but that's what you ...
5 years, 3 months ago (2015-09-10 16:26:12 UTC) #4
iannucci
https://codereview.chromium.org/1336443003/diff/1/service/datastore/pls_test.go File service/datastore/pls_test.go (left): https://codereview.chromium.org/1336443003/diff/1/service/datastore/pls_test.go#oldcode1278 service/datastore/pls_test.go:1278: DSBS: ByteString("nerds"), On 2015/09/10 16:26:11, dnj (Google) wrote: > ...
5 years, 3 months ago (2015-09-10 17:29:21 UTC) #5
dnj
https://codereview.chromium.org/1336443003/diff/1/service/datastore/pls_test.go File service/datastore/pls_test.go (left): https://codereview.chromium.org/1336443003/diff/1/service/datastore/pls_test.go#oldcode1278 service/datastore/pls_test.go:1278: DSBS: ByteString("nerds"), On 2015/09/10 17:29:21, iannucci wrote: > On ...
5 years, 3 months ago (2015-09-10 17:32:21 UTC) #6
iannucci
haha got it :)
5 years, 3 months ago (2015-09-10 17:37:38 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1336443003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1336443003/60001
5 years, 3 months ago (2015-09-10 17:37:58 UTC) #10
commit-bot: I haz the power
5 years, 3 months ago (2015-09-10 17:40:43 UTC) #11
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://github.com/luci/gae/commit/9ce8b9442816469d8c4e3c53572d52aaf4d7378e

Powered by Google App Engine
This is Rietveld 408576698