apache / apache/datafusion

Friendlier SQL in `SELECT` and `WHERE`

Open
#17,361 3 comments 1 reaction 1 assignee Claimed by @rkrishn7 View on GitHub
enhancement
Dominant language
Rust
Stars
9.3k
Forks
2.4k
Avg merge
3d 7h
Merged PRs (30d)
344

Description

### Is your feature request related to a problem or challenge?

In the spirit of making SQL a bit more [friendly](https://duckdb.org/docs/stable/sql/dialect/friendly_sql.html) in DF, we can allow aliases in a few more places.

### Describe the solution you'd like

Take a bit more inspiration from DuckDB's Friendly SQL. Specifically:

- Support lateral column aliases (e.g.: `SELECT a AS b, b + 1 AS c FROM t`)
- Support column aliases in `WHERE` (we already do this in `HAVING`, `GROUP BY`, etc.)

### Describe alternatives you've considered

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.