Repository navigation
Conversation
dhermes
left a comment
There was a problem hiding this comment.
Looks mostly OK, just a few comments that are "orthogonal" to the content
| self.TABLE, self.COLUMNS, KeySet(keys=[(0,)]))) | ||
|
|
||
| all_data_rows = list(self._row_data(ROW_COUNT)) | ||
| expected = all_data_rows[:1] |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| [(row[0], row[2]) for row in self._row_data(ROW_COUNT)])) | ||
| self._check_row_data(rows, expected) | ||
|
|
||
| def test_read_w_single_key(self): |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| keyset = KeySet(ranges=(closed_closed,)) | ||
| rows = list(snapshot.read( | ||
| self.TABLE, self.COLUMNS, keyset)) | ||
| expected = all_data_rows[START:END+1] |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| keyset = KeySet(ranges=(open_open,)) | ||
| rows = list(snapshot.read( | ||
| self.TABLE, self.COLUMNS, keyset)) | ||
| expected = all_data_rows[START+1:END] |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| keyset = KeySet(ranges=(open_closed,)) | ||
| rows = list(snapshot.read( | ||
| self.TABLE, self.COLUMNS, keyset)) | ||
| expected = all_data_rows[START+1:END+1] |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| snapshot = session.snapshot(read_timestamp=committed) | ||
| all_data_rows = list(self._row_data(ROW_COUNT)) | ||
|
|
||
| closed_closed = KeyRange(start_closed=[START], end_closed=[END]) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
|
||
| snapshot = session.snapshot(read_timestamp=committed) | ||
| rows = list(snapshot.read( | ||
| self.TABLE, self.COLUMNS, KeySet(keys=[(0,), (1,), (2,)]))) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| "SELECT ARRAY(SELECT AS STRUCT C1, C2 " | ||
| "FROM (SELECT 'a' AS C1, 1 AS C2 " | ||
| "UNION ALL SELECT 'b' AS C1, 2 AS C2) " | ||
| "ORDER BY C1 ASC)" |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
- Read single key. - Read multiple keys. - Read open-closed ranges. - Read open-open ranges. - Read closed-open ranges. - Read closed-closed ranges.
- Query returning 'ARRAY<STRUCT>'.
- Bind INT64 parameter to null.
804590c to
9aefd29
Compare
|
@dhermes, @lukesneeringer I had to cherry-pick 474cb18 into the PR because the back-end suddenly began including instance configs for zones (e.g., |
Ack. No worries. |
|
Merged via #3604 |
Additional systests for
Snapshot.read:Additional system test for
Snapshot.execute_sql:ARRAY<STRUCT>.INT64parameter to null.