-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
Description
What happens?
An unexpected error occurs when a CTE is MATERIALIZED: Error: Binder Error: table "CTE" has duplicate column name "A1"
To Reproduce
CREATE TABLE T0(C1 INT);
CREATE TABLE T1(C1 INT);
INSERT INTO T0(C1) VALUES (1);
INSERT INTO T1(C1) VALUES (1);
-- no problem
WITH CTE AS (
SELECT A1, * FROM T0
LEFT JOIN (
SELECT C1 AS A1 FROM T1
) ON T0.C1 = A1
) SELECT A1 FROM CTE;
-- binder error
WITH CTE AS MATERIALIZED (
SELECT A1, * FROM T0
LEFT JOIN (
SELECT C1 AS A1 FROM T1
) ON T0.C1 = A1
) SELECT A1 FROM CTE;
OS:
macOS 14.2.1 (23C71)
DuckDB Version:
v0.9.2
DuckDB Client:
CLI
Full Name:
Tanner Lai
Affiliation:
Appian
Have you tried this on the latest main
branch?
I have tested with a release build (and could not test with a main build)
Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?
- Yes, I have