alamb edited a comment on pull request #288:
URL: https://github.com/apache/arrow-datafusion/pull/288#issuecomment-840759475


   @jorgecarleitao  I would like `now()` to be added to datafusion in the next 
few weeks -- my usecase is that I want to be able to write queries with 
predicates like "in the last 5 minutes" (which are very common in timeseries 
queries). The standard sql I know to do this is
   
   ```
   WHERE ts > now() - interval '5 minutes'
   ```
   
   However, that query also requires timestamp arithmetic -- part of 
https://github.com/apache/arrow-datafusion/issues/194 -- but I can work around 
the lack of https://github.com/apache/arrow-datafusion/issues/194 with casting. 
I can't think of any way to work around the lack of `now()`
   
   I also am not sure I would call `now()` "stateful" in the sense that it has 
state that changes during the execution of the query. It is more like 
"parameterized" or something with a parameter that is filled in prior to 
execution


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

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


Reply via email to