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

No longer possible to specify custom timestamp column value in 3.0.0 #529

Closed
fnewberg opened this issue Mar 22, 2024 · 1 comment · Fixed by #530
Closed

No longer possible to specify custom timestamp column value in 3.0.0 #529

fnewberg opened this issue Mar 22, 2024 · 1 comment · Fixed by #530
Assignees
Milestone

Comments

@fnewberg
Copy link

It used to be possible to specify a custom value rather than a column in the table as the timestamp value, but this seems to no longer be possible in 3.0.0. Previously I could specify that the timestamp should be computed from an hour column, but this no longer gets saved when I try to specify it.

image

This then in turn breaks the $timeFilter and $timeSeries macros

SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t

becomes

SELECT
    (intDiv(toUInt32(undefined), 10) * 10) * 1000 as t,
    count()
FROM session.session_version

WHERE
    date >= toDate(1711124831)
    AND date <= toDate(1711146431)
    AND undefined >= toDateTime(1711124831)
    AND undefined <= toDateTime(1711146431)
GROUP BY t

ORDER BY t

not presence of undefined in 3 places

@Slach Slach added this to the 3.0.1 milestone Mar 23, 2024
@Slach
Copy link
Collaborator

Slach commented Mar 23, 2024

as quick workaround could you try

SELECT $timeSeries(toDateTime(hour*3600)) as t, count() FROM $table WHERE $timeFilter(toDateTime(hour*3600)) GROUP BY t ORDER BY t

but not sure will it work or not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants