Jefffrey commented on PR #10833:
URL: https://github.com/apache/datafusion/pull/10833#issuecomment-2156022903

   > > Just curious, does this let you get away with something funky like:
   > > ```sql
   > > select extract('''epoch''' from now());
   > > ```
   > 
   > It seems the invalid input @Jefffrey
   > 
   > ```shell
   > DataFusion CLI v39.0.0
   > > select extract('''epoch''' from now());  🤔 Invalid statement: sql parser 
error: Expected date/time field, found: ''epoch''
   > ```
   
   Ah whoops. What about:
   
   ```sql
   select extract("''''epoch''''" from now());
   ```
   
   FWIW this is how Postgres treats it:
   
   ```
   postgres=# select extract("''''epoch''''" from now());
   ERROR:  unit "''''epoch''''" not recognized for type timestamp with time zone
   ```


-- 
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