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

Support expression in time field for timeseries #107

Closed
gingerwizard opened this issue Mar 10, 2022 · 1 comment
Closed

Support expression in time field for timeseries #107

gingerwizard opened this issue Mar 10, 2022 · 1 comment

Comments

@gingerwizard
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

Currently if you using the TimeSeries component of the query builder, the user is forced to select a time field. Its not uncommon for users to a time field encoded in a different type e.g. int. ClickHouse supports expressions to allow conversion if required.

Describe the solution you'd like=

Please allow free typing of an expression in the Timefield input or allow switching to an expression mode.

Additional context

image

This needs alittle care since ther time field is used in the WHERE clause e.g. $__timeFilter(created_at) - this should probably use the alias time or id expect issues on some expressions.

@gingerwizard gingerwizard changed the title Support expression in time field for Support expression in time field for timeseries Mar 10, 2022
@scottlepp scottlepp added the enhancement New feature or request label Mar 11, 2022
@bossinc bossinc added the AST 2.0 label Jun 2, 2022
@bossinc bossinc self-assigned this Jun 2, 2022
@bossinc bossinc removed their assignment Apr 27, 2023
@SpencerTorres
Copy link
Collaborator

This is now possible in v4

The $__timeInterval macro is still added when in Time Series Aggregate mode, but the query still functions as expected. time alias is also handled in the query. If the user wanted to exclude this macro they could use Table Aggregate mode.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

6 participants