fugue-project / fugue

A unified interface for distributed computing. Fugue executes SQL, Python, Pandas, and Polars code on Spark, Dask and Ray without any rewrites.
https://fugue-tutorials.readthedocs.io/
Apache License 2.0
1.98k stars 94 forks source link

[FEATURE] Add syntax for `SELECT` without `FROM` #458

Open goodwanghan opened 1 year ago

goodwanghan commented 1 year ago

In Fugue SQL SELECT without FROM means it will use the previous step output.

However sometimes standard SQL doesn't need FROM. for example

SELECT 1 AS a

This is not common but can happen especially in embedded SQL. So we need a way to handle it.

We could add a special syntax: FROM . to indicate this statement doesn't have FROM.