apache / apache/cloudberry

Subquery multiple return value test unstable

Open
#66 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
1.4k
Forks
247
Avg merge
4d 3h
Merged PRs (30d)
39

Description

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 may get the result:

ERROR: one or more assertions failed
DETAIL: Expected no more than one row to be returned by expression

Contributor guide

Open the contributing guide

Research direction

Start with qp_union_intersect_optimizer.out at line 1736 and reproduce the UPDATE after setting optimizer_segments=2 and running ANALYZE on dml_union_r and dml_union_s. Compare repeated runs with the two reported errors; done means the test consistently reports the expected multiple-row subquery error.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
databases, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.