What happened?
Related to #6020 . When a column has the same name as a relation, referencing it resolves to the source table instead of the columns.
In a sort, this causes the compilation to fail. In a select, it results in a wildcard select
PRQL input
# Sort case
from status | sort {this.status}
# Select case
from status | select {this.status}
SQL output
# Sort case
from `status` | sort {this.`status`}
──────┬──────
╰──────── table instance cannot be referenced directly
# Select case
SELECT
*
FROM
status
Expected SQL output
# Sort case
SELECT * FROM status ORDER BY status.status
# Select case
SELECT status FROM status
MVCE confirmation
Anything else?
No response
What happened?
Related to #6020 . When a column has the same name as a relation, referencing it resolves to the source table instead of the columns.
In a
sort, this causes the compilation to fail. In aselect, it results in a wildcard selectPRQL input
SQL output
Expected SQL output
MVCE confirmation
Anything else?
No response