-
Notifications
You must be signed in to change notification settings - Fork 590
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(stream): fix pk indices of GroupTopN executors (#12304)
Signed-off-by: Richard Chien <[email protected]>
- Loading branch information
Showing
5 changed files
with
68 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
statement ok | ||
SET RW_IMPLICIT_FLUSH TO true; | ||
|
||
# https://github.com/risingwavelabs/risingwave/issues/12282 | ||
|
||
statement ok | ||
create table t(a int, b int, c int); | ||
|
||
statement ok | ||
create materialized view mv as SELECT * FROM ( | ||
SELECT | ||
*, | ||
row_number() OVER (PARTITION BY a ORDER BY b) AS rank | ||
FROM t | ||
) WHERE rank <= 1; | ||
|
||
statement ok | ||
insert into t values (1, 1, 1); | ||
|
||
query iiiI | ||
select * from mv; | ||
---- | ||
1 1 1 1 | ||
|
||
statement ok | ||
insert into t values (1, 0, 1); | ||
|
||
query iiiI | ||
select * from mv; | ||
---- | ||
1 0 1 1 | ||
|
||
statement ok | ||
insert into t values (1, 0, 1); | ||
|
||
query iiiI | ||
select * from mv; | ||
---- | ||
1 0 1 1 | ||
|
||
statement ok | ||
drop materialized view mv; | ||
|
||
statement ok | ||
drop table t; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters