Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions spanner/tests/system/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -1535,6 +1535,25 @@ def test_execute_sql_returning_array_of_struct(self):
[[['a', 1], ['b', 2]]],
])

def test_execute_sql_returning_empty_array_of_struct(self):
SQL = (
"SELECT ARRAY(SELECT AS STRUCT C1, C2 "
"FROM (SELECT 2 AS C1) X "
"JOIN (SELECT 1 AS C2) Y "
"ON X.C1 = Y.C2 "
"ORDER BY C1 ASC)"
)
self._db.snapshot(multi_use=True)

self._check_sql_results(
self._db,
sql=SQL,
params=None,
param_types=None,
expected=[
[[]],
])

def test_invalid_type(self):
table = 'counters'
columns = ('name', 'value')
Expand Down