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): panic when aggregation on distinct onresult #19175

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

bug(fe): panic when aggregation on distinct onresult #19175

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 count(*) from (
    select distinct on(a,b) * from t
)

output

dev=> explain select count(*) from ( select distinct on(a) * from t);
                                QUERY PLAN
---------------------------------------------------------------------------
 BatchSimpleAgg { aggs: [sum0(count)] }
 └─BatchExchange { order: [], dist: Single }
   └─BatchSimpleAgg { aggs: [count] }
     └─BatchGroupTopN { order: [], limit: 1, offset: 0, group_key: [t.a] }
       └─BatchExchange { order: [], dist: HashShard(t.a) }
         └─BatchScan { table: t, columns: [a] }
(6 rows)

dev=> explain select count(*) from ( select distinct on(b) * from t);
ERROR:  Panicked when handling the request: index out of bounds: the len is 1 but the index is 1
This is a bug. We would appreciate a bug report at:
  https://github.com/risingwavelabs/risingwave/issues/new?labels=type%2Fbug&template=bug_report.yml
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.
psql (16.3, server 13.14.0)
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