this.<name>` resolves to the source relation instead of a same-named colum
Author: lukapeschkeCreated Jul 7, 2026Updated Jul 7, 2026
Labelsbug
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
statusExpected SQL output
# Sort case
SELECT * FROM status ORDER BY status.status
# Select case
SELECT status FROM statusMVCE confirmation
- Minimal example
- New issue
Anything else?
No response
Source: PRQL/prql