Hi all,

Following the discussion on adding FROM-first syntax support to IoTDB's
Table SQL dialect, I would like to initiate a vote on the clause ordering.

We currently have two options:

Option A: (FROM relation SELECT WHERE)

Example: FROM sensors SELECT temperature WHERE temperature > 15

Option B: (FROM relation WHERE SELECT)

Example: FROM sensors WHERE temperature > 15 SELECT temperature

Both options share the same core benefits, including better IDE/CLI
auto-completion and quick data exploration, since they both start with FROM.
The difference is:

   - Option A aligns with the approach used in DuckDB, helping maintain
   consistency with the existing implementation and making it more familiar to
   users migrating from other systems.
   - Option B aligns better with the actual execution logic and human
   thought process: first, you define the data source (FROM), then you filter
   it (WHERE), and finally, you choose what to project (SELECT)

For more context, please refer to the discussion thread:
https://lists.apache.org/thread/p1psfm5y9zo270tn75rz1cdglff7ogc8

Please share your preference (Option A or Option B) and any additional
thoughts.

Best regards,

Abdelrahman

Reply via email to