Skip to content

Using time in hstreamdb #1197

Closed Answered by Commelina
gwafflar asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for your report! According to the document, the query can be written by function CAST(... AS ...):

CREATE VIEW impression_daily AS SELECT CAST(event_at AS DATE) AS day_, COUNT(*) AS impressions_count FROM impressions_stream GROUP BY day_;

However, there is a bug related to TIMESTAMPs and aliases in GROUP BY clause, which prevents the system to produce correct outputs for the query above. We will fix it as soon as possible and then you can try it again using the latest commit.

Also, note that DATE is used for date literals (e.g. INSERT INTO some_stream (some_column) VALUES (DATE 2022-12-12)) or a type (e.g. CAST(... AS DATE)) and DAY is not a function name now (we will recheck our …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by 4eUeP
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bug Something isn't working
3 participants