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

fix: support GROUP BY with no source columns used #5644

Merged
merged 1 commit into from Jun 19, 2020

Conversation

big-andy-coates
Copy link
Contributor

Description

fixes: #5643

Adds support for a GROUP BY query where there are no source columns used in the query, e.g.

CREATE TABLE OUTPUT as SELECT 1 as k, count(1) AS ID FROM INPUT group by 1;

This was previously failing as it ran into an issue deserializing the query plan due to nonAggColumns not being present in the plan.

Testing done

usual

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")

fixes:

Adds support for a `GROUP BY` query where there are no source columns used in the query, e.g.

```sql
CREATE TABLE OUTPUT as SELECT 1 as k, count(1) AS ID FROM INPUT group by 1;
```

This was previously failing as it ran into an issue deserializing the query plan due to `nonAggColumns` not being present in the plan.
@big-andy-coates big-andy-coates requested a review from a team as a code owner June 18, 2020 19:36
Copy link
Member

@vpapavas vpapavas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vpapavas vpapavas self-assigned this Jun 19, 2020
@agavra agavra merged commit b2bfefd into confluentinc:master Jun 19, 2020
agavra pushed a commit that referenced this pull request Jun 19, 2020
fixes:

Adds support for a `GROUP BY` query where there are no source columns used in the query, e.g.

```sql
CREATE TABLE OUTPUT as SELECT 1 as k, count(1) AS ID FROM INPUT group by 1;
```

This was previously failing as it ran into an issue deserializing the query plan due to `nonAggColumns` not being present in the plan.

Co-authored-by: Andy Coates <big-andy-coates@users.noreply.github.com>
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 this pull request may close these issues.

GROUP BY with no non-aggregate columns crashes CommandRunner thread
3 participants