We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 330f13e commit ce359b4Copy full SHA for ce359b4
packages/google-cloud-spanner/tests/system/test_system.py
@@ -1536,6 +1536,25 @@ def test_execute_sql_returning_array_of_struct(self):
1536
[[['a', 1], ['b', 2]]],
1537
])
1538
1539
+ def test_execute_sql_returning_empty_array_of_struct(self):
1540
+ SQL = (
1541
+ "SELECT ARRAY(SELECT AS STRUCT C1, C2 "
1542
+ "FROM (SELECT 2 AS C1) X "
1543
+ "JOIN (SELECT 1 AS C2) Y "
1544
+ "ON X.C1 = Y.C2 "
1545
+ "ORDER BY C1 ASC)"
1546
+ )
1547
+ self._db.snapshot(multi_use=True)
1548
+
1549
+ self._check_sql_results(
1550
+ self._db,
1551
+ sql=SQL,
1552
+ params=None,
1553
+ param_types=None,
1554
+ expected=[
1555
+ [[]],
1556
+ ])
1557
1558
def test_invalid_type(self):
1559
table = 'counters'
1560
columns = ('name', 'value')
0 commit comments