You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error message is "referenced column not found in FROM clause", but should be "column X does not exist".
To Reproduce
Run the following in any duckdb (I ran it in motherduck)
with test_data as (
select'foo'as a
)
selecttest_data.foobaras new_column from test_data where new_column is not null;
The trick is defining new_column as some sort of reference to a non-existent column in the upstream CTE.
The error message DuckDB returns is "referenced column new_column not found in FROM clause", which is not the case (caused me to pull my hair out wondering about mismatched DuckDB versions and stuff). The actual error is because there is no column named foobar in the test_data CTE.
OS:
Linux x64
DuckDB Version:
0.9.2
DuckDB Client:
Python
Full Name:
Jason Raede
Affiliation:
Pliable
Have you tried this on the latest main branch?
I have tested 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?