datafusion icon indicating copy to clipboard operation
datafusion copied to clipboard

incorrect `where` clause comparison while using table alias

Open waitingkuo opened this issue 3 years ago • 0 comments

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

DataFusion CLI v10.0.0
❯ select * from (select 1 as a) f where f.a=2;
+---+
| a |
+---+
| 1 |
+---+
1 row in set. Query took 0.000 seconds.

while this works in postgresql

willy=# select * from (select 1 as a) f where f.a=2;
 a 
---
(0 rows)

Expected behavior

should output 0 row

Additional context Add any other context about the problem here.

waitingkuo avatar Aug 08 '22 09:08 waitingkuo