Skip to content

Commit 796854a

Browse files
committed
Added/Updated tests\functional\arno\optimizer\test_opt_full_join_02.py: Replaced WHERE-expr: added coalesce() after discussion with dimitr. Checked on 3.0.11.33665, 4.0.3.2904, 5.0.0.970
1 parent 34f1623 commit 796854a

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

tests/functional/arno/optimizer/test_opt_full_join_02.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@
88
Three tables are used, where 1 table (RC) holds references to the two other tables (R and C).
99
The two tables R and C contain both 1 value that isn't inside RC.
1010
NOTES:
11-
[27.12.2020]
12-
added 'rc.categoryid' to 'order by' list in order to have always stable sort result.
13-
Mismatch with expected result due to different position of records with the same 'rc.relationid'
14-
occured on 4.0.0.2298. CHecked on 4.0.0.2303.
11+
[27.12.2020]
12+
added 'rc.categoryid' to 'order by' list in order to have always stable sort result.
13+
Mismatch with expected result due to different position of records with the same 'rc.relationid'
14+
occured on 4.0.0.2298. CHecked on 4.0.0.2303.
15+
[07.03.2023] pzotov
16+
Replaced WHERE-expr: added coalesce() after discussion with dimitr, letter 07-mar-2023 16:29.
17+
Plan changed for datasource 'R'.
18+
Checked on 3.0.11.33665, 4.0.3.2904, 5.0.0.970
1519
FBTEST: functional.arno.optimizer.opt_full_join_02
1620
"""
1721

@@ -67,6 +71,7 @@
6771

6872
test_script = """
6973
set plan on;
74+
--set explain on;
7075
--set list on;
7176
7277
--full join should return ...
@@ -80,7 +85,8 @@
8085
full join relationcategories rc on (rc.relationid = r.relationid)
8186
full join categories c on (c.categoryid = rc.categoryid)
8287
where
83-
r.relationid >= 2
88+
--r.relationid >= 2
89+
coalesce(r.relationid,0) >= 2
8490
order by
8591
rc.relationid desc
8692
,rc.categoryid
@@ -90,8 +96,7 @@
9096
act = isql_act('db', test_script, substitutions=[('=', ''), ('[ \t]+', ' ')])
9197

9298
expected_stdout = """
93-
PLAN SORT (JOIN (JOIN (C NATURAL, JOIN (JOIN (RC NATURAL, R INDEX (PK_RELATIONS)), JOIN (R INDEX (PK_RELATIONS), RC INDEX (FK_RC_RELATIONS)))), JOIN (JOIN (JOIN (RC NATURAL, R INDEX (PK_RELATIONS)), JOIN (R INDEX (PK_RELATIONS), RC INDEX (FK_RC_RELATIONS))), C NATURAL)))
94-
99+
PLAN SORT (JOIN (JOIN (C NATURAL, JOIN (JOIN (RC NATURAL, R INDEX (PK_RELATIONS)), JOIN (R NATURAL, RC INDEX (FK_RC_RELATIONS)))), JOIN (JOIN (JOIN (RC NATURAL, R INDEX (PK_RELATIONS)), JOIN (R NATURAL, RC INDEX (FK_RC_RELATIONS))), C NATURAL)))
95100
RELATIONNAME RELATIONID CATEGORYID DESCRIPTION
96101
=================================== ============ ============ ============
97102
racing turtle 3 1 relation

0 commit comments

Comments
 (0)