Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KSQL should provide a function for CURRENT_TIMESTAMP / SYSDATE #2412

Closed
rmoff opened this issue Feb 5, 2019 · 4 comments
Closed

KSQL should provide a function for CURRENT_TIMESTAMP / SYSDATE #2412

rmoff opened this issue Feb 5, 2019 · 4 comments
Milestone

Comments

@rmoff
Copy link
Contributor

rmoff commented Feb 5, 2019

A common requirement in data processing is to only process data with a given range of the current time. Therefore support for a function such as SYSDATE (or whatever we call it) would be useful.

For example:

SELECT * FROM SOURCE_STREAM WHERE END_DATE < SYSDATE

To make this properly useful we'd also need date arithmetic so that you could offset the current time.

Whilst this fixed-time processing may not be 'pure' in the true streaming sense of the world (for example, how do you consider late arriving data in this concept, do you compare it to current time now etc), it is useful for many 'normal' applications in which people are shifting from doing work in the DB to doing it in KSQL.

@sparkheo7
Copy link

I see its merged but I am getting error can't find this function error.
I am using docker image confluentinc/cp-ksql-server:5.2.1.

@rmoff
Copy link
Contributor Author

rmoff commented Jul 18, 2019

@vcrfxia this was merged into master after 5.3 was cut I think, so will it be in the next 5.3.x release? Thanks.

@vcrfxia
Copy link
Contributor

vcrfxia commented Jul 18, 2019

this was merged into master after 5.3 was cut I think, so will it be in the next 5.3.x release?

Yes, that's correct. The new UNIX_TIMESTAMP and UNIX_DATE functions did not make it into 5.3. They will be included in the next release after 5.3 (i.e., 5.4).

@MichaelDrogalis MichaelDrogalis added this to the 5.4 milestone Jul 18, 2019
@vcrfxia
Copy link
Contributor

vcrfxia commented Jul 23, 2019

Closing since the relevant PR has been merged.

@vcrfxia vcrfxia closed this as completed Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants