-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Quoted from @houqp:
.filter(df.column("bool_col")) should ignore the projection alias and only use the actual bool_col table column to evaluate the predicate. This is be behavior I see in postgres. For example SELECT id+1 as id2 FROM test where id2 > 2 results in error: column "id2" does not exist.
To reproduce:
import datafusion as df
# bool_col is an integer here, convert it to be actually boolean
bool_col = (df.column("bool_col") == df.literal(1)).alias("bool_col")
result = table.select(bool_col).filter(df.column("bool_col"))
result.collect()raises
Exception: Error during planning: Ambiguous reference to field named 'bool_col'
Originally posted by @kszucs in ibis-project/ibis#2918 (comment)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working