| 1375 | |
| 1376 | @testing.requires.intersect |
| 1377 | def test_composite_alias(self, connection): |
| 1378 | t1, t2, t3 = self.tables("t1", "t2", "t3") |
| 1379 | |
| 1380 | ua = intersect( |
| 1381 | select(t2.c.col3, t2.c.col4), |
| 1382 | union( |
| 1383 | select(t1.c.col3, t1.c.col4), |
| 1384 | select(t2.c.col3, t2.c.col4), |
| 1385 | select(t3.c.col3, t3.c.col4), |
| 1386 | ) |
| 1387 | .alias() |
| 1388 | .select(), |
| 1389 | ).alias() |
| 1390 | |
| 1391 | wanted = [("aaa", "bbb"), ("bbb", "ccc"), ("ccc", "aaa")] |
| 1392 | found = self._fetchall_sorted(connection.execute(ua.select())) |
| 1393 | eq_(found, wanted) |
| 1394 | |
| 1395 | |
| 1396 | class JoinTest(fixtures.TablesTest): |