Skip to content

Commit 772960b

Browse files
authored
Spanner: rationalize 'all_types' round-trip systest (#6379)
* Expand 'all_types' table to include arrays of all types. Use a separate 'pkey' column for the key, to make clear how null integer values are normally used. * Remove redundant query param bindings tests using 'all_types' table. Add tableless tests for float bindings with transfinite values. Add tableless tests for queries returning explicit transfinite values. * Refactor round-trip test, 'all_types' data to make feature coverage clearar.
1 parent 90f921f commit 772960b

File tree

2 files changed

+155
-229
lines changed

2 files changed

+155
-229
lines changed

spanner/tests/_fixtures.py

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,22 @@
2929
PRIMARY KEY (contact_id, phone_type),
3030
INTERLEAVE IN PARENT contacts ON DELETE CASCADE;
3131
CREATE TABLE all_types (
32-
list_goes_on ARRAY<INT64>,
33-
are_you_sure BOOL,
34-
raw_data BYTES(16),
35-
hwhen DATE,
36-
approx_value FLOAT64,
37-
eye_d INT64,
38-
description STRING(16),
39-
exactly_hwhen TIMESTAMP)
40-
PRIMARY KEY (eye_d);
32+
pkey INT64 NOT NULL,
33+
int_value INT64,
34+
int_array ARRAY<INT64>,
35+
bool_value BOOL,
36+
bool_array ARRAY<BOOL>,
37+
bytes_value BYTES(16),
38+
bytes_array ARRAY<BYTES(16)>,
39+
date_value DATE,
40+
date_array ARRAY<DATE>,
41+
float_value FLOAT64,
42+
float_array ARRAY<FLOAT64>,
43+
string_value STRING(16),
44+
string_array ARRAY<STRING(16)>,
45+
timestamp_value TIMESTAMP,
46+
timestamp_array ARRAY<TIMESTAMP>)
47+
PRIMARY KEY (pkey);
4148
CREATE TABLE counters (
4249
name STRING(1024),
4350
value INT64 )

0 commit comments

Comments
 (0)