(self)
| 33 | ) |
| 34 | |
| 35 | def test_standalone(self): |
| 36 | table1 = self.tables.people |
| 37 | |
| 38 | # no special alias handling even though clause is not in the |
| 39 | # context of a FROM clause |
| 40 | self.assert_compile( |
| 41 | tablesample(table1, 1, name="alias"), |
| 42 | "people AS alias TABLESAMPLE system(:system_1)", |
| 43 | ) |
| 44 | |
| 45 | self.assert_compile( |
| 46 | table1.tablesample(1, name="alias"), |
| 47 | "people AS alias TABLESAMPLE system(:system_1)", |
| 48 | ) |
| 49 | |
| 50 | self.assert_compile( |
| 51 | tablesample( |
| 52 | table1, func.bernoulli(1), name="alias", seed=func.random() |
| 53 | ), |
| 54 | "people AS alias TABLESAMPLE bernoulli(:bernoulli_1) " |
| 55 | "REPEATABLE (random())", |
| 56 | ) |
| 57 | |
| 58 | def test_select_from(self): |
| 59 | table1 = self.tables.people |
nothing calls this directly
no test coverage detected