You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When generation 2 phase topn plan for batch query, and the input is singleton, the result is incorrect.
Error message/log
No response
To Reproduce
CREATETABLEt1 (
pk int,
a int,
b int,
c bigint,
d int
);
CREATE MATERIALIZED VIEW t1_mv ASSELECTSUM(a) as sa, SUM(b) as sb, SUM(c) as sc, SUM(d) as sd FROM t1;
EXPLAIN
SELECT sa, count(*) as cnt2
FROM t1_mv GROUP BY sa ORDER BY cnt2 DESCLIMIT50 OFFSET 50;
The result is:
dev=> EXPLAIN
SELECT sa, count(*) as cnt2
FROM t1_mv GROUP BY sa ORDER BY cnt2 DESCLIMIT50 OFFSET 50;
QUERY PLAN
--------------------------------------------------------------------------
BatchExchange { order: [count DESC], dist: Single }
└─BatchTopN { order: [count DESC], limit: 100, offset: 0 }
└─BatchSimpleAgg { aggs: [internal_last_seen_value(t1_mv.sa), count] }
└─BatchScan { table: t1_mv, columns: [sa] }
(4 rows)
Expected behavior
The topn should still be offset 50, limit 50.
How did you deploy RisingWave?
Docker.
The version of RisingWave
dev=>select version() ;
version
------------------------------------------------------------------------------------
PostgreSQL 9.5.0-RisingWave-1.7.0-alpha (fb42759622c52f682c6b905d887f8c2c3591c80d)
(1 row)
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
When generation 2 phase topn plan for batch query, and the input is singleton, the result is incorrect.
Error message/log
No response
To Reproduce
The result is:
Expected behavior
The topn should still be offset 50, limit 50.
How did you deploy RisingWave?
Docker.
The version of RisingWave
Additional context
No response
The text was updated successfully, but these errors were encountered: