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

panic when stream top N has a large limit #5285

Closed
xxchan opened this issue Sep 12, 2022 · 4 comments · Fixed by #5286
Closed

panic when stream top N has a large limit #5285

xxchan opened this issue Sep 12, 2022 · 4 comments · Fixed by #5286
Labels
type/bug Something isn't working

Comments

@xxchan
Copy link
Member

xxchan commented Sep 12, 2022

Describe the bug

No response

To Reproduce

dev=> create table t(x int);
CREATE_TABLE
dev=> create materialized view mv as select generate_series(1,x,1) y from t;
CREATE_MATERIALIZED_VIEW
dev=> create materialized view mv2 as select * from mv order by y limit 5000;
CREATE_MATERIALIZED_VIEW
dev=> insert into t values (20000);
INSERT 0 1
thread 'risingwave-streaming-actor' panicked at 'assertion failed: `(left == right)`
  left: `904`,
 right: `5000`', src/common/src/array/stream_chunk.rs:90:13

Expected behavior

No response

Additional context

No response

@xxchan xxchan added the type/bug Something isn't working label Sep 12, 2022
@github-actions github-actions bot added this to the release-0.1.13 milestone Sep 12, 2022
@xxchan
Copy link
Member Author

xxchan commented Sep 12, 2022

ProjectSet produced a large chunk, and TopN failed to handle large chunk & limit correctly, since here's an unused Option:

data_chunk_builder.append_one_row_from_datums(row.0.iter())?;

@xxchan
Copy link
Member Author

xxchan commented Sep 12, 2022

Look forward to rust-lang/rust#71368 🤪

@BugenZhao
Copy link
Member

We may mark the methods #[must_use] manually for now.

@mergify mergify bot closed this as completed in #5286 Sep 13, 2022
@xxchan
Copy link
Member Author

xxchan commented Sep 13, 2022

We may mark the methods #[must_use] manually for now.

It's Result<Option<>>. You can't mark it 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants