You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/12/07 14:03:01 UTC
[GitHub] [arrow-datafusion] kszucs opened a new issue #1411: Ambiguous reference to aliased column
kszucs opened a new issue #1411:
URL: https://github.com/apache/arrow-datafusion/issues/1411
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:
```python
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 https://github.com/ibis-project/ibis/pull/2918#discussion_r749318005_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb closed issue #1411: Ambiguous reference to aliased column
Posted by GitBox <gi...@apache.org>.
alamb closed issue #1411:
URL: https://github.com/apache/arrow-datafusion/issues/1411
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org