adriangb commented on PR #17295:
URL: https://github.com/apache/datafusion/pull/17295#issuecomment-3281120327

   @alamb we discussed a bit in 
https://github.com/apache/datafusion/pull/17520#issuecomment-3280334178, I'm 
not sure that this PR introduced a bug. If I understand correctly `select from 
t1` should be equivalent to `select * from t1` -> then there is no bug. Now if 
`select from t1` is meant to be `select every row but no columns` then there is 
a bug but it has nothing to do with the where clause or projection pushdown.
   
   FWIW:
   
   ```
   DataFusion CLI v50.0.0
   > create table t1 (a int, b int);
   0 row(s) fetched. 
   Elapsed 0.004 seconds.
   
   > insert into t1 values (1, 2);
   +-------+
   | count |
   +-------+
   | 1     |
   +-------+
   1 row(s) fetched. 
   Elapsed 0.010 seconds.
   
   > select * from t1;
   +---+---+
   | a | b |
   +---+---+
   | 1 | 2 |
   +---+---+
   1 row(s) fetched. 
   Elapsed 0.003 seconds.
   
   > select from t1;
   +---+---+
   | a | b |
   +---+---+
   | 1 | 2 |
   +---+---+
   1 row(s) fetched. 
   Elapsed 0.004 seconds.
   
   > from t1;
   +---+---+
   | a | b |
   +---+---+
   | 1 | 2 |
   +---+---+
   1 row(s) fetched. 
   Elapsed 0.001 seconds.
   ```
   
   Postgres:
   ```
   postgres=# create table t1 (a int, b int);
   CREATE TABLE
   postgres=# insert into t1 values (1), (2);
   INSERT 0 2
   postgres=# select * from t1;
    a | b 
   ---+---
    1 |  
    2 |  
   (2 rows)
   
   postgres=# select from t1;
   --
   (2 rows)
   
   postgres=# from t1;
   ERROR:  syntax error at or near "from"
   LINE 1: from t1;
   ```
   
   DuckDB:
   ```sql
   DuckDB v1.3.2 (Ossivalis) 0b83e5d2f6
   Enter ".help" for usage hints.
   Connected to a transient in-memory database.
   Use ".open FILENAME" to reopen on a persistent database.
   D create table t1 AS (select 1 as a, 2 as b);
   D insert into t1 values (1, 2);
   D select from t1;
   Parser Error:
   SELECT clause without selection list
   D from t1;
   ┌───────┬───────┐
   │   a   │   b   │
   │ int32 │ int32 │
   ├───────┼───────┤
   │     1 │     2 │
   │     1 │     2 │
   └───────┴───────┘
   ```


-- 
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-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to