Adding upstream version 26.8.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
4b797b16f0
commit
4c394df415
61 changed files with 43883 additions and 41898 deletions
|
@ -216,6 +216,28 @@ class TestOptimizer(unittest.TestCase):
|
|||
)
|
||||
|
||||
def test_qualify_tables(self):
|
||||
self.assertEqual(
|
||||
optimizer.qualify_tables.qualify_tables(
|
||||
parse_one(
|
||||
"WITH cte AS (SELECT * FROM t) SELECT * FROM cte PIVOT(SUM(c) FOR v IN ('x', 'y'))"
|
||||
),
|
||||
db="db",
|
||||
catalog="catalog",
|
||||
).sql(),
|
||||
"WITH cte AS (SELECT * FROM catalog.db.t AS t) SELECT * FROM cte AS cte PIVOT(SUM(c) FOR v IN ('x', 'y')) AS _q_0",
|
||||
)
|
||||
|
||||
self.assertEqual(
|
||||
optimizer.qualify_tables.qualify_tables(
|
||||
parse_one(
|
||||
"WITH cte AS (SELECT * FROM t) SELECT * FROM cte PIVOT(SUM(c) FOR v IN ('x', 'y')) AS pivot_alias"
|
||||
),
|
||||
db="db",
|
||||
catalog="catalog",
|
||||
).sql(),
|
||||
"WITH cte AS (SELECT * FROM catalog.db.t AS t) SELECT * FROM cte AS cte PIVOT(SUM(c) FOR v IN ('x', 'y')) AS pivot_alias",
|
||||
)
|
||||
|
||||
self.assertEqual(
|
||||
optimizer.qualify_tables.qualify_tables(
|
||||
parse_one("select a from b"), catalog="catalog"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue