Skip to content

Commit

Permalink
spanner read missing single key with index (#4419)
Browse files Browse the repository at this point in the history
  • Loading branch information
chemelnucfin authored Dec 4, 2017
1 parent dfe8a41 commit ad1174b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions spanner/tests/system/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,20 @@ def test_read_with_single_keys_index(self):
rows = list(results_iter)
self.assertEqual(rows, [expected[row]])

def test_empty_read_with_single_keys_index(self):
row_count = 10
columns = self.COLUMNS[1], self.COLUMNS[2]
session, committed = self._set_up_table(row_count)
self.to_delete.append(session)
keyset = [["Non", "Existent"]]
results_iter = session.read(self.TABLE,
columns,
KeySet(keys=keyset),
index='name'
)
rows = list(results_iter)
self.assertEqual(rows, [])

def test_snapshot_read_w_various_staleness(self):
from datetime import datetime
from google.cloud._helpers import UTC
Expand Down

0 comments on commit ad1174b

Please sign in to comment.