Skip to content

Implement current_time Function #3982

@alamb

Description

@alamb

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
As we add more full featured date/time support for DataFusion users need to be able to use the current time to calculate things like "all data in the last 5 hours"

Describe the solution you'd like
Support the current_time postgres function https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-CURRENT

Note I think we should avoid the current_time(precision) variant initially -- we can implement it as a follow on PR.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
This is a feature request we got from an early (internal) user of InfluxDB IOx

I believe this is a good first issue as you can follow the existing implementation of now()

It would be a good exercise to add a new build in scalar function, physical planing support, and then tests

Note this the same ticket exists for the current_date function #3981

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions