Describe the bug
DataFusion will sometimes resolve expressions incorrectly when the alias shadows an expression
To Reproduce
DataFusion CLI v37.1.0
> select a + b from (select 1 as a, 2 as b, 1 as "a + b");
+-------+
| a + b |
+-------+
| 1 | <- Should be 3
+-------+
1 row(s) fetched.
Elapsed 0.009 seconds.
Expected behavior
Result should be 3
Additional context
This was found by @peter-toth in #10396