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

Permit grouping columns to be used in `order by`/`having` #521

Closed
nblumhardt opened this issue Dec 16, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@nblumhardt
Copy link
Member

commented Dec 16, 2016

Seq takes the slightly unorthodox approach of creating implicit result columns for SQL groupings. This isn't respected all the way through the query engine yet, so attempting to write a query like:

select count(*) from stream
group by StatusCode, RequestPath
order by StatusCode desc
having StatusCode > 399

Results in the error:

The `order by` clause can only refer to projected column aliases.

This is an issue for both order by and having. If the grouping is a simple expression, as in the example above, this should be reasonably easy to accept and will increase the number of queries that can be expressed in Seq's SQL dialect.

@nblumhardt nblumhardt added this to the 4.0-pre milestone Dec 16, 2016

@nblumhardt nblumhardt closed this Dec 16, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.