Merge "Correctly apply self_group in type_coerce element."

This commit is contained in:
mike bayer
2020-05-23 21:21:39 +00:00
committed by Gerrit Code Review
3 changed files with 25 additions and 6 deletions
+7
View File
@@ -439,6 +439,13 @@ class SelectableTest(
assert isinstance(stmt2.selected_columns.foo.type, MyType)
assert isinstance(subq2.c.foo.type, MyType)
def test_type_coerce_selfgroup(self):
no_group = column("a") / type_coerce(column("x"), Integer)
group = column("b") / type_coerce(column("y") * column("w"), Integer)
self.assert_compile(no_group, "a / x")
self.assert_compile(group, "b / (y * w)")
def test_subquery_on_table(self):
sel = select([table1, table2], use_labels=True).subquery()