From 430588c5648b5b7eb6c19f143fb845d33a242775 Mon Sep 17 00:00:00 2001 From: pavel-zotov Date: Sat, 4 Mar 2023 18:49:13 +0300 Subject: [PATCH] Updated tests\bugs\core_1549_test.py: adjust expected stdout/stderr to current FB version. --- tests/bugs/core_1549_test.py | 65 ++++++++++++++++++++++++++++++------ 1 file changed, 55 insertions(+), 10 deletions(-) diff --git a/tests/bugs/core_1549_test.py b/tests/bugs/core_1549_test.py index 7a01992f..29e0fece 100644 --- a/tests/bugs/core_1549_test.py +++ b/tests/bugs/core_1549_test.py @@ -65,15 +65,60 @@ test_script = """ act = isql_act('db', test_script) -expected_stdout = """ - EXISTS with ref. to 1st stream: +fb3x_expected_out = """ + EXISTS with ref. to 1st stream: - Select Expression + Select Expression + -> Filter + -> Table "T" as "X" Access By ID + -> Bitmap + -> Index "T_ID" Range Scan (full match) + Select Expression + -> Filter + -> Table "T" as "Z" Access By ID + -> Bitmap + -> Index "T_ID" Range Scan (full match) + Select Expression + -> Nested Loop Join (inner) + -> Filter + -> Table "T" as "A" Full Scan + -> Filter + -> Table "T" as "B" Access By ID + -> Bitmap + -> Index "T_ID" Range Scan (lower bound: 1/1) + + + Two sep. DT and EXISTS inside: + + Select Expression + -> Filter + -> Table "T" as "B X" Access By ID + -> Bitmap + -> Index "T_ID" Range Scan (full match) + Select Expression + -> Filter + -> Table "T" as "A X" Access By ID + -> Bitmap + -> Index "T_ID" Range Scan (full match) + Select Expression + -> Nested Loop Join (inner) + -> Filter + -> Table "T" as "A T1" Full Scan + -> Filter + -> Table "T" as "B T2" Access By ID + -> Bitmap + -> Index "T_ID" Range Scan (lower bound: 1/1) +""" + +fb5x_expected_out = """ + EXISTS with ref. to 1st stream: + + Sub-query -> Filter -> Table "T" as "X" Access By ID -> Bitmap -> Index "T_ID" Range Scan (full match) - Select Expression + Sub-query -> Filter -> Table "T" as "Z" Access By ID -> Bitmap @@ -87,15 +132,16 @@ expected_stdout = """ -> Bitmap -> Index "T_ID" Range Scan (lower bound: 1/1) + Two sep. DT and EXISTS inside: - Two sep. DT and EXISTS inside: - Select Expression + + Sub-query -> Filter -> Table "T" as "B X" Access By ID -> Bitmap -> Index "T_ID" Range Scan (full match) - Select Expression + Sub-query -> Filter -> Table "T" as "A X" Access By ID -> Bitmap @@ -109,10 +155,9 @@ expected_stdout = """ -> Bitmap -> Index "T_ID" Range Scan (lower bound: 1/1) """ - @pytest.mark.version('>=3.0') def test_1(act: Action): - act.expected_stdout = expected_stdout - act.execute() + act.expected_stdout = fb3x_expected_out if act.is_version('<5') else fb5x_expected_out + act.execute(combine_output = True) assert act.clean_stdout == act.clean_expected_stdout