spanner/spannertest: don't reject reads specifying an index to use
This is only a hint, and spannertest's simulation doesn't use indexes
anyway.
Fixes #1808.
Change-Id: I59802faa892db96519eda1fc76d77aea11ad42d6
Reviewed-on: https://code-review.googlesource.com/c/gocloud/+/52730
Reviewed-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Shanika Kuruppu <skuruppu@google.com>
diff --git a/spanner/spannertest/inmem.go b/spanner/spannertest/inmem.go
index 9a39bc3..37d19c8 100644
--- a/spanner/spannertest/inmem.go
+++ b/spanner/spannertest/inmem.go
@@ -513,7 +513,8 @@
// Bail out if various advanced features are being used.
if req.Index != "" {
- return fmt.Errorf("index reads (%q) not supported", req.Index)
+ // This is okay; we can still return results.
+ s.logf("Warning: index reads (%q) not supported", req.Index)
}
if len(req.ResumeToken) > 0 {
// This should only happen if we send resume_token ourselves.