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

HogQL: Support for CTEs in a union query #20663

Open
thmsobrmlr opened this issue Mar 1, 2024 · 0 comments
Open

HogQL: Support for CTEs in a union query #20663

thmsobrmlr opened this issue Mar 1, 2024 · 0 comments
Labels
enhancement New feature or request feature/hogql

Comments

@thmsobrmlr
Copy link
Contributor

Is your feature request related to a problem?

A CTE is only accessible from the first query in a union query.

WITH test AS (SELECT 123 AS value)
SELECT value FROM test
UNION ALL
SELECT value FROM test
Screenshot 2024-03-01 at 13 50 07

Describe the solution you'd like

CTEs should be handled in the same way ClickHouse does.

Describe alternatives you've considered

Repeating the CTE for each query.

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

1 participant