Commit e6684a3
committed
fix(unparser): substitute a dropped alias only for unqualified columns
A qualified reference like `t.x` names `t`'s own column and cannot refer
to a projection alias, so rewriting it whenever a dropped alias happens to
share the name changes the query's meaning. Guard the substitution on
`col.relation.is_none()`, matching the same check in sql/src/utils.rs.1 parent cd5cc64 commit e6684a3
1 file changed
Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
328 | 335 | | |
329 | 336 | | |
330 | 337 | | |
| |||
0 commit comments