Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions tests/fast/test_replacement_scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,15 +288,15 @@ def test_cte_with_joins(self, duckdb_cursor):
WHERE a < 3
)
SELECT * FROM (
SELECT
cte1.*,
SELECT
cte1.*,
cte2.a AS cte2_a,
subquery.a AS cte3_a
FROM cte1
JOIN cte2 ON cte1.a = cte2.a
JOIN (
SELECT
df.*,
SELECT
df.*,
cte3.a AS cte3_a
FROM df
JOIN cte3 ON df.a = cte3.a
Expand All @@ -309,6 +309,7 @@ def test_cte_with_joins(self, duckdb_cursor):
res = rel.fetchall()
assert res == [(2, 2, 2)]

@pytest.mark.xfail(reason="Bug in DuckDB core (MRE at #19154)")
def test_same_name_cte(self, duckdb_cursor):
query = """
WITH df AS (
Expand Down Expand Up @@ -417,8 +418,8 @@ def test_cte_at_different_levels(self, duckdb_cursor):
WITH cte1 AS (
SELECT * FROM df
)
SELECT
cte1.*,
SELECT
cte1.*,
cte2.a AS cte2_a,
subquery.a AS cte3_a
FROM cte1
Expand All @@ -434,8 +435,8 @@ def test_cte_at_different_levels(self, duckdb_cursor):
SELECT * FROM df
WHERE a < 3
)
SELECT
df.*,
SELECT
df.*,
cte3.a AS cte3_a
FROM (
SELECT * FROM df
Expand Down