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

bug(fe): should check the column in distinct on for aggregation query #19177

Open
st1page opened this issue Oct 29, 2024 · 0 comments
Open

bug(fe): should check the column in distinct on for aggregation query #19177

st1page opened this issue Oct 29, 2024 · 0 comments
Milestone

Comments

@st1page
Copy link
Contributor

st1page commented Oct 29, 2024

reproduce

create table t(a int, b int);
explain select distinct on(a,b) count(*) from t;

output

dev=> create table t(a int, b int);
CREATE_TABLE
dev=> explain select distinct on(a,b) count(*) from t;
ERROR:  Panicked when handling the request: insert at index 1 exceeds fixbitset size 1

expected

postgres=# create table t(a int, b int);
explain select distinct on(a,b) count(*) from t;
CREATE TABLE
ERROR:  column "t.a" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: explain select distinct on(a,b) count(*) from t;
                                   ^
@github-actions github-actions bot added this to the release-2.2 milestone Oct 29, 2024
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

No branches or pull requests

1 participant