Subquery multiple return value test unstable
- Dominant language
- C
- Stars
- 1.4k
- Forks
- 247
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 39
Description
qp_union_intersect,
In qp_union_intersect_optimizer.out line 1736,the sql
```
set optimizer_segments=2;
ANALYZE dml_union_r, dml_union_s;
UPDATE dml_union_r SET a = ( SELECT a FROM dml_union_r UNION ALL SELECT a|1724 -- ERROR: one or more assertions failed FROM dml_union_s);
```
should always get the result:
```
ERROR: more than one row returned by a subquery used as an expression (seg2 slice1 10.138.0.30:7004 pid=3108610)
```
but we get result sometime:
```
ERROR: one or more assertions failed
DETAIL: Expected no more than one row to be returned by expression
```
Contributor guide
Research direction
Start with the qp_union_intersect test and qp_union_intersect_optimizer.out around line 1736, then reproduce the UPDATE with optimizer_segments=2 and the ANALYZE steps shown. Investigate why the same multiple-row subquery sometimes produces an assertion failure instead of the reported more-than-one-row error; done means the test consistently reports the expected error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, postgresql, sql
- Domain
- databases, distributed-systems, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100