New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MATERIALIZED causes Binder Error: table has duplicate column name #10260
Comments
This is expected behavior. Your query produces column name
Either rename one of the occurences |
Hmm, I would expect that materializing a CTE should not affect the correctness of the results or whether or not there would be results at all (e.g. in this case where it fails to bind). WITH CTE AS /* MATERIALIZED */ (
SELECT A1, * FROM T0
LEFT JOIN (
SELECT C1 AS A1 FROM T1
) ON T0.C1 = A1
) SELECT * FROM CTE; Like you said A1 is selected twice, but the column is automatically realiased. I think it's not unreasonable to expect materialize to maintain this behavior.
|
Alright, that makes sense. See PR #10386. |
Fixed in #10386 |
What happens?
An unexpected error occurs when a CTE is MATERIALIZED:
Error: Binder Error: table "CTE" has duplicate column name "A1"
To Reproduce
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?
The text was updated successfully, but these errors were encountered: