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

WITH FILL for HogQL #17002

Open
usualdesigner opened this issue Aug 11, 2023 · 3 comments
Open

WITH FILL for HogQL #17002

usualdesigner opened this issue Aug 11, 2023 · 3 comments
Labels
enhancement New feature or request feature/hogql

Comments

@usualdesigner
Copy link

Is your feature request related to a problem?

yes

Please describe.
I want to make a time-series request via HogQL. Is it possible to use WITH FILL for gap filling?

@mariusandra
Copy link
Collaborator

mariusandra commented Aug 11, 2023

Thanks for the request! I've marked it down in our big todo list. We'll definitely implement it, but I can't promise exactly when.

Docs on the feature: https://clickhouse.com/docs/en/sql-reference/statements/select/order-by#order-by-expr-with-fill-modifier

@usualdesigner
Copy link
Author

Thanks, @mariusandra !

@isAdrisal
Copy link

Hey @mariusandra, this appears marked as completed but I'm not able to get it to work in HogQL. I get a "no viable alernative" error.

Is this query expected to work (as per the linked clickhouse docs)? My use case is for filling date columns to create time series reports. (eg. with fill step interval 1 week).

select value, 'original' as source
from (
    select
        number as value
    from numbers(10)
    where number % 2 = 0
)
order by value with fill from 0 to 10 step 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature/hogql
Projects
None yet
Development

No branches or pull requests

4 participants