Check firebird.log [no messages found for interval when this test was running]
Jump to: output_first_mismatch    outcomes_full_history    elapsed_time_chart
Show cross-report outcomes.

Annotation type Annotation details
2 @message
assert   
  + Initial script failed, check output:
  + Statement failed, SQLSTATE = 22021
  + unsuccessful metadata update
  + -ALTER CHARACTER SET "SYSTEM"."UTF8" failed
  + -COLLATION "SYSTEM"."CI_COLL" for CHARACTER SET "SYSTEM"."UTF8" is not defined
  + After line 16 in file /var/tmp/qa_2024/test_11666/gh_8061.tmp.sql
  - 1000
  - select c3.cust_no
  - from customer c3
  - where exists (
  - select  s3.cust_no
  - from sales s3
  - where s3.cust_no = c3.cust_no and
  - exists (
  - select x.emp_no
  - from employee x
  - where
  - x.job_country = c3.country
  - )
  - )
  - Subqueries that are correlated to non-parent; for example,
  - subquery SQ3 is contained by SQ2 (parent of SQ3) and SQ2 in turn is contained
  - by SQ1 and SQ3 is correlated to tables defined in SQ1.
  - Sub-query
  - ....-> Filter
  - ........-> Table "EMPLOYEE" as "X" Full Scan
  - Sub-query
  - ....-> Filter (preliminary)
  - ........-> Filter
  - ............-> Table "SALES" as "S3" Access By ID
  - ................-> Bitmap
  - ....................-> Index "SALES_CUSTOMER_FK_CUST_NO" Range Scan (full match)
  - Select Expression
  - ....-> Filter
  - ........-> Table "CUSTOMER" as "C3" Full Scan
  - 2000
  - select c3.cust_no
  - from customer c3
  - where exists (
  - select s3.cust_no
  - from sales s3
  - where s3.cust_no = c3.cust_no
  - group by s3.cust_no
  - )
  - A group-by subquery is correlated; in this case, unnesting implies doing join
  - after group-by. Changing the given order of the two operations may not be always legal.
  - Sub-query
  - ....-> Aggregate
  - ........-> Filter
  - ............-> Table "SALES" as "S3" Access By ID
  - ................-> Index "SALES_CUSTOMER_FK_CUST_NO" Range Scan (full match)
  - Select Expression
  - ....-> Filter
  - ........-> Table "CUSTOMER" as "C3" Full Scan
  - 3000
  - select s1.cust_no
  - from sales s1
  - where exists (
  - select 1 from customer c1 where s1.cust_no = c1.cust_no
  - union all
  - select 1 from employee x1 where s1.sales_rep = x1.emp_no
  - )
  - For disjunctive subqueries, the outer columns in the connecting
  - or correlating conditions are not the same.
  - Sub-query
  - ....-> Union
  - ........-> Filter
  - ............-> Table "CUSTOMER" as "C1" Access By ID
  - ................-> Bitmap
  - ....................-> Index "CUSTOMER_PK" Unique Scan
  - ........-> Filter
  - ............-> Table "EMPLOYEE" as "X1" Access By ID
  - ................-> Bitmap
  - ....................-> Index "EMPLOYEE_PK" Unique Scan
  - Select Expression
  - ....-> Filter
  - ........-> Table "SALES" as "S1" Full Scan
  - 4000
  - select x1.emp_no
  - from employee x1
  - where
  - (
  - x1.job_country = 'USA' or
  - exists (
  - select 1
  - from sales s1
  - where s1.sales_rep = x1.emp_no
  - )
  - )
  - An `OR` condition in compound WHERE expression, see https://jonathanlewis.wordpress.com/2007/02/26/subquery-with-or/
  - Sub-query
  - ....-> Filter
  - ........-> Table "SALES" as "S1" Access By ID
  - ............-> Bitmap
  - ................-> Index "SALES_EMPLOYEE_FK_SALES_REP" Range Scan (full match)
  - Select Expression
  - ....-> Filter
  - ........-> Table "EMPLOYEE" as "X1" Full Scan

LOG DETAILS:

2025-06-25 05:22:42.741
2025-06-25 05:22:42.750 act = <firebird.qa.plugin.Action object at [hex]>
2025-06-25 05:22:42.757 tmp_sql = PosixPath('/var/tmp/qa_2024/test_11666/gh_8061.tmp.sql')
2025-06-25 05:22:42.763 capsys = <_pytest.capture.CaptureFixture object at [hex]>
2025-06-25 05:22:42.769
2025-06-25 05:22:42.774 @pytest.mark.version('>=5.0.1')
2025-06-25 05:22:42.780 def test_1(act: Action, tmp_sql: Path, capsys):
2025-06-25 05:22:42.787 employee_data_sql = zipfile.Path(act.files_dir / 'standard_sample_databases.zip', at='sample-DB_-_firebird.sql')
2025-06-25 05:22:42.794 tmp_sql.write_bytes(employee_data_sql.read_bytes())
2025-06-25 05:22:42.804
2025-06-25 05:22:42.812 act.isql(switches = ['-q'], charset='utf8', input_file = tmp_sql, combine_output = True)
2025-06-25 05:22:42.819
2025-06-25 05:22:42.829 if act.return_code == 0:
2025-06-25 05:22:42.841
2025-06-25 05:22:42.855 srv_cfg = driver_config.register_server(name = f'srv_cfg_8061_addi', config = '')
2025-06-25 05:22:42.867 db_cfg_name = f'db_cfg_8061_addi'
2025-06-25 05:22:42.878 db_cfg_object = driver_config.register_database(name = db_cfg_name)
2025-06-25 05:22:42.888 db_cfg_object.server.value = srv_cfg.name
2025-06-25 05:22:42.896 db_cfg_object.database.value = str(act.db.db_path)
2025-06-25 05:22:42.902 if act.is_version('<6'):
2025-06-25 05:22:42.911 db_cfg_object.config.value = f"""
2025-06-25 05:22:42.922 SubQueryConversion = true
2025-06-25 05:22:42.931 """
2025-06-25 05:22:42.938
2025-06-25 05:22:42.949 with connect(db_cfg_name, user = act.db.user, password = act.db.password) as con:
2025-06-25 05:22:42.958 cur = con.cursor()
2025-06-25 05:22:42.966 for q_idx, q_tuple in query_map.items():
2025-06-25 05:22:42.973 test_sql, qry_comment = q_tuple[:2]
2025-06-25 05:22:42.984 ps = cur.prepare(test_sql)
2025-06-25 05:22:42.995 print(q_idx)
2025-06-25 05:22:43.005 print(test_sql)
2025-06-25 05:22:43.015 print(qry_comment)
2025-06-25 05:22:43.026 print( '\n'.join([replace_leading(s) for s in ps.detailed_plan.split('\n')]) )
2025-06-25 05:22:43.034 ps.free()
2025-06-25 05:22:43.042
2025-06-25 05:22:43.051 else:
2025-06-25 05:22:43.063 # If retcode !=0 then we can print the whole output of failed gbak:
2025-06-25 05:22:43.071 print('Initial script failed, check output:')
2025-06-25 05:22:43.078 for line in act.clean_stdout.splitlines():
2025-06-25 05:22:43.084 print(line)
2025-06-25 05:22:43.090 act.reset()
2025-06-25 05:22:43.100
2025-06-25 05:22:43.108 act.expected_stdout = f"""
2025-06-25 05:22:43.120 1000
2025-06-25 05:22:43.132 {query_map[1000][0]}
2025-06-25 05:22:43.142 {query_map[1000][1]}
2025-06-25 05:22:43.152 Sub-query
2025-06-25 05:22:43.163 ....-> Filter
2025-06-25 05:22:43.173 ........-> Table "EMPLOYEE" as "X" Full Scan
2025-06-25 05:22:43.180 Sub-query
2025-06-25 05:22:43.186 ....-> Filter (preliminary)
2025-06-25 05:22:43.197 ........-> Filter
2025-06-25 05:22:43.208 ............-> Table "SALES" as "S3" Access By ID
2025-06-25 05:22:43.216 ................-> Bitmap
2025-06-25 05:22:43.224 ....................-> Index "SALES_CUSTOMER_FK_CUST_NO" Range Scan (full match)
2025-06-25 05:22:43.230 Select Expression
2025-06-25 05:22:43.237 ....-> Filter
2025-06-25 05:22:43.243 ........-> Table "CUSTOMER" as "C3" Full Scan
2025-06-25 05:22:43.249
2025-06-25 05:22:43.255 2000
2025-06-25 05:22:43.261 {query_map[2000][0]}
2025-06-25 05:22:43.267 {query_map[2000][1]}
2025-06-25 05:22:43.273 Sub-query
2025-06-25 05:22:43.279 ....-> Aggregate
2025-06-25 05:22:43.285 ........-> Filter
2025-06-25 05:22:43.291 ............-> Table "SALES" as "S3" Access By ID
2025-06-25 05:22:43.299 ................-> Index "SALES_CUSTOMER_FK_CUST_NO" Range Scan (full match)
2025-06-25 05:22:43.309 Select Expression
2025-06-25 05:22:43.317 ....-> Filter
2025-06-25 05:22:43.325 ........-> Table "CUSTOMER" as "C3" Full Scan
2025-06-25 05:22:43.336
2025-06-25 05:22:43.346 3000
2025-06-25 05:22:43.354 {query_map[3000][0]}
2025-06-25 05:22:43.365 {query_map[3000][1]}
2025-06-25 05:22:43.377 Sub-query
2025-06-25 05:22:43.388 ....-> Union
2025-06-25 05:22:43.395 ........-> Filter
2025-06-25 05:22:43.402 ............-> Table "CUSTOMER" as "C1" Access By ID
2025-06-25 05:22:43.409 ................-> Bitmap
2025-06-25 05:22:43.416 ....................-> Index "CUSTOMER_PK" Unique Scan
2025-06-25 05:22:43.422 ........-> Filter
2025-06-25 05:22:43.428 ............-> Table "EMPLOYEE" as "X1" Access By ID
2025-06-25 05:22:43.434 ................-> Bitmap
2025-06-25 05:22:43.445 ....................-> Index "EMPLOYEE_PK" Unique Scan
2025-06-25 05:22:43.450 Select Expression
2025-06-25 05:22:43.455 ....-> Filter
2025-06-25 05:22:43.462 ........-> Table "SALES" as "S1" Full Scan
2025-06-25 05:22:43.467
2025-06-25 05:22:43.474 4000
2025-06-25 05:22:43.487 {query_map[4000][0]}
2025-06-25 05:22:43.496 {query_map[4000][1]}
2025-06-25 05:22:43.502 Sub-query
2025-06-25 05:22:43.508 ....-> Filter
2025-06-25 05:22:43.514 ........-> Table "SALES" as "S1" Access By ID
2025-06-25 05:22:43.526 ............-> Bitmap
2025-06-25 05:22:43.536 ................-> Index "SALES_EMPLOYEE_FK_SALES_REP" Range Scan (full match)
2025-06-25 05:22:43.544 Select Expression
2025-06-25 05:22:43.551 ....-> Filter
2025-06-25 05:22:43.558 ........-> Table "EMPLOYEE" as "X1" Full Scan
2025-06-25 05:22:43.569 """
2025-06-25 05:22:43.580 act.stdout = capsys.readouterr().out
2025-06-25 05:22:43.588 >       assert act.clean_stdout == act.clean_expected_stdout
2025-06-25 05:22:43.595 E       assert
2025-06-25 05:22:43.602 E         + Initial script failed, check output:
2025-06-25 05:22:43.612 E         + Statement failed, SQLSTATE = 22021
2025-06-25 05:22:43.624 E         + unsuccessful metadata update
2025-06-25 05:22:43.634 E         + -ALTER CHARACTER SET "SYSTEM"."UTF8" failed
2025-06-25 05:22:43.643 E         + -COLLATION "SYSTEM"."CI_COLL" for CHARACTER SET "SYSTEM"."UTF8" is not defined
2025-06-25 05:22:43.650 E         + After line 16 in file /var/tmp/qa_2024/test_11666/gh_8061.tmp.sql
2025-06-25 05:22:43.657 E         - 1000
2025-06-25 05:22:43.663 E         - select c3.cust_no
2025-06-25 05:22:43.670 E         - from customer c3
2025-06-25 05:22:43.680 E         - where exists (
2025-06-25 05:22:43.690 E         - select  s3.cust_no
2025-06-25 05:22:43.702 E         - from sales s3
2025-06-25 05:22:43.712 E         - where s3.cust_no = c3.cust_no and
2025-06-25 05:22:43.723 E         - exists (
2025-06-25 05:22:43.734 E         - select x.emp_no
2025-06-25 05:22:43.742 E         - from employee x
2025-06-25 05:22:43.749 E         - where
2025-06-25 05:22:43.756 E         - x.job_country = c3.country
2025-06-25 05:22:43.763 E         - )
2025-06-25 05:22:43.770 E         - )
2025-06-25 05:22:43.779 E         - Subqueries that are correlated to non-parent; for example,
2025-06-25 05:22:43.786 E         - subquery SQ3 is contained by SQ2 (parent of SQ3) and SQ2 in turn is contained
2025-06-25 05:22:43.794 E         - by SQ1 and SQ3 is correlated to tables defined in SQ1.
2025-06-25 05:22:43.802 E         - Sub-query
2025-06-25 05:22:43.808 E         - ....-> Filter
2025-06-25 05:22:43.814 E         - ........-> Table "EMPLOYEE" as "X" Full Scan
2025-06-25 05:22:43.818 E         - Sub-query
2025-06-25 05:22:43.823 E         - ....-> Filter (preliminary)
2025-06-25 05:22:43.828 E         - ........-> Filter
2025-06-25 05:22:43.835 E         - ............-> Table "SALES" as "S3" Access By ID
2025-06-25 05:22:43.843 E         - ................-> Bitmap
2025-06-25 05:22:43.851 E         - ....................-> Index "SALES_CUSTOMER_FK_CUST_NO" Range Scan (full match)
2025-06-25 05:22:43.858 E         - Select Expression
2025-06-25 05:22:43.867 E         - ....-> Filter
2025-06-25 05:22:43.875 E         - ........-> Table "CUSTOMER" as "C3" Full Scan
2025-06-25 05:22:43.882 E         - 2000
2025-06-25 05:22:43.892 E         - select c3.cust_no
2025-06-25 05:22:43.901 E         - from customer c3
2025-06-25 05:22:43.909 E         - where exists (
2025-06-25 05:22:43.917 E         - select s3.cust_no
2025-06-25 05:22:43.923 E         - from sales s3
2025-06-25 05:22:43.931 E         - where s3.cust_no = c3.cust_no
2025-06-25 05:22:43.939 E         - group by s3.cust_no
2025-06-25 05:22:43.946 E         - )
2025-06-25 05:22:43.953 E         - A group-by subquery is correlated; in this case, unnesting implies doing join
2025-06-25 05:22:43.962 E         - after group-by. Changing the given order of the two operations may not be always legal.
2025-06-25 05:22:43.971 E         - Sub-query
2025-06-25 05:22:43.982 E         - ....-> Aggregate
2025-06-25 05:22:43.996 E         - ........-> Filter
2025-06-25 05:22:44.007 E         - ............-> Table "SALES" as "S3" Access By ID
2025-06-25 05:22:44.016 E         - ................-> Index "SALES_CUSTOMER_FK_CUST_NO" Range Scan (full match)
2025-06-25 05:22:44.022 E         - Select Expression
2025-06-25 05:22:44.034 E         - ....-> Filter
2025-06-25 05:22:44.044 E         - ........-> Table "CUSTOMER" as "C3" Full Scan
2025-06-25 05:22:44.055 E         - 3000
2025-06-25 05:22:44.064 E         - select s1.cust_no
2025-06-25 05:22:44.073 E         - from sales s1
2025-06-25 05:22:44.081 E         - where exists (
2025-06-25 05:22:44.087 E         - select 1 from customer c1 where s1.cust_no = c1.cust_no
2025-06-25 05:22:44.093 E         - union all
2025-06-25 05:22:44.099 E         - select 1 from employee x1 where s1.sales_rep = x1.emp_no
2025-06-25 05:22:44.104 E         - )
2025-06-25 05:22:44.110 E         - For disjunctive subqueries, the outer columns in the connecting
2025-06-25 05:22:44.119 E         - or correlating conditions are not the same.
2025-06-25 05:22:44.128 E         - Sub-query
2025-06-25 05:22:44.135 E         - ....-> Union
2025-06-25 05:22:44.142 E         - ........-> Filter
2025-06-25 05:22:44.150 E         - ............-> Table "CUSTOMER" as "C1" Access By ID
2025-06-25 05:22:44.157 E         - ................-> Bitmap
2025-06-25 05:22:44.168 E         - ....................-> Index "CUSTOMER_PK" Unique Scan
2025-06-25 05:22:44.175 E         - ........-> Filter
2025-06-25 05:22:44.183 E         - ............-> Table "EMPLOYEE" as "X1" Access By ID
2025-06-25 05:22:44.195 E         - ................-> Bitmap
2025-06-25 05:22:44.204 E         - ....................-> Index "EMPLOYEE_PK" Unique Scan
2025-06-25 05:22:44.212 E         - Select Expression
2025-06-25 05:22:44.220 E         - ....-> Filter
2025-06-25 05:22:44.226 E         - ........-> Table "SALES" as "S1" Full Scan
2025-06-25 05:22:44.236 E         - 4000
2025-06-25 05:22:44.248 E         - select x1.emp_no
2025-06-25 05:22:44.259 E         - from employee x1
2025-06-25 05:22:44.270 E         - where
2025-06-25 05:22:44.282 E         - (
2025-06-25 05:22:44.293 E         - x1.job_country = 'USA' or
2025-06-25 05:22:44.301 E         - exists (
2025-06-25 05:22:44.314 E         - select 1
2025-06-25 05:22:44.324 E         - from sales s1
2025-06-25 05:22:44.332 E         - where s1.sales_rep = x1.emp_no
2025-06-25 05:22:44.339 E         - )
2025-06-25 05:22:44.347 E         - )
2025-06-25 05:22:44.358 E         - An `OR` condition in compound WHERE expression, see https://jonathanlewis.wordpress.com/2007/02/26/subquery-with-or/
2025-06-25 05:22:44.365 E         - Sub-query
2025-06-25 05:22:44.373 E         - ....-> Filter
2025-06-25 05:22:44.380 E         - ........-> Table "SALES" as "S1" Access By ID
2025-06-25 05:22:44.387 E         - ............-> Bitmap
2025-06-25 05:22:44.394 E         - ................-> Index "SALES_EMPLOYEE_FK_SALES_REP" Range Scan (full match)
2025-06-25 05:22:44.400 E         - Select Expression
2025-06-25 05:22:44.406 E         - ....-> Filter
2025-06-25 05:22:44.412 E         - ........-> Table "EMPLOYEE" as "X1" Full Scan
2025-06-25 05:22:44.419
2025-06-25 05:22:44.430 tests/bugs/gh_8061_addi_test.py:225: AssertionError
2025-06-25 05:22:44.442 ---------------------------- Captured stdout setup -----------------------------
2025-06-25 05:22:44.451 Creating db: localhost:/var/tmp/qa_2024/test_11666/test.fdb [page_size=None, sql_dialect=None, charset='NONE', user=SYSDBA, password=masterkey]
3 #text
act = <firebird.qa.plugin.Action pytest object at [hex]>
tmp_sql = PosixPath('/var/tmp/qa_2024/test_11666/gh_8061.tmp.sql')
capsys = <_pytest.capture.CaptureFixture pytest object at [hex]>

    @pytest.mark.version('>=5.0.1')
    def test_1(act: Action, tmp_sql: Path, capsys):
        employee_data_sql = zipfile.Path(act.files_dir / 'standard_sample_databases.zip', at='sample-DB_-_firebird.sql')
        tmp_sql.write_bytes(employee_data_sql.read_bytes())
    
        act.isql(switches = ['-q'], charset='utf8', input_file = tmp_sql, combine_output = True)
    
        if act.return_code == 0:
    
            srv_cfg = driver_config.register_server(name = f'srv_cfg_8061_addi', config = '')
            db_cfg_name = f'db_cfg_8061_addi'
            db_cfg_object = driver_config.register_database(name = db_cfg_name)
            db_cfg_object.server.value = srv_cfg.name
            db_cfg_object.database.value = str(act.db.db_path)
            if act.is_version('<6'):
                db_cfg_object.config.value = f"""
                    SubQueryConversion = true
                """
    
            with connect(db_cfg_name, user = act.db.user, password = act.db.password) as con:
                cur = con.cursor()
                for q_idx, q_tuple in query_map.items():
                    test_sql, qry_comment = q_tuple[:2]
                    ps = cur.prepare(test_sql)
                    print(q_idx)
                    print(test_sql)
                    print(qry_comment)
                    print( '\n'.join([replace_leading(s) for s in ps.detailed_plan.split('\n')]) )
                    ps.free()
    
        else:
            # If retcode !=0 then we can print the whole output of failed gbak:
            print('Initial script failed, check output:')
            for line in act.clean_stdout.splitlines():
                print(line)
        act.reset()
    
        act.expected_stdout = f"""
            1000
            {query_map[1000][0]}
            {query_map[1000][1]}
            Sub-query
            ....-> Filter
            ........-> Table "EMPLOYEE" as "X" Full Scan
            Sub-query
            ....-> Filter (preliminary)
            ........-> Filter
            ............-> Table "SALES" as "S3" Access By ID
            ................-> Bitmap
            ....................-> Index "SALES_CUSTOMER_FK_CUST_NO" Range Scan (full match)
            Select Expression
            ....-> Filter
            ........-> Table "CUSTOMER" as "C3" Full Scan
    
            2000
            {query_map[2000][0]}
            {query_map[2000][1]}
            Sub-query
            ....-> Aggregate
            ........-> Filter
            ............-> Table "SALES" as "S3" Access By ID
            ................-> Index "SALES_CUSTOMER_FK_CUST_NO" Range Scan (full match)
            Select Expression
            ....-> Filter
            ........-> Table "CUSTOMER" as "C3" Full Scan
    
            3000
            {query_map[3000][0]}
            {query_map[3000][1]}
            Sub-query
            ....-> Union
            ........-> Filter
            ............-> Table "CUSTOMER" as "C1" Access By ID
            ................-> Bitmap
            ....................-> Index "CUSTOMER_PK" Unique Scan
            ........-> Filter
            ............-> Table "EMPLOYEE" as "X1" Access By ID
            ................-> Bitmap
            ....................-> Index "EMPLOYEE_PK" Unique Scan
            Select Expression
            ....-> Filter
            ........-> Table "SALES" as "S1" Full Scan
    
            4000
            {query_map[4000][0]}
            {query_map[4000][1]}
            Sub-query
            ....-> Filter
            ........-> Table "SALES" as "S1" Access By ID
            ............-> Bitmap
            ................-> Index "SALES_EMPLOYEE_FK_SALES_REP" Range Scan (full match)
            Select Expression
            ....-> Filter
            ........-> Table "EMPLOYEE" as "X1" Full Scan
        """
        act.stdout = capsys.readouterr().out
>       assert act.clean_stdout == act.clean_expected_stdout
E       assert   
E         + Initial script failed, check output:
E         + Statement failed, SQLSTATE = 22021
E         + unsuccessful metadata update
E         + -ALTER CHARACTER SET "SYSTEM"."UTF8" failed
E         + -COLLATION "SYSTEM"."CI_COLL" for CHARACTER SET "SYSTEM"."UTF8" is not defined
E         + After line 16 in file /var/tmp/qa_2024/test_11666/gh_8061.tmp.sql
E         - 1000
E         - select c3.cust_no
E         - from customer c3
E         - where exists (
E         - select  s3.cust_no
E         - from sales s3
E         - where s3.cust_no = c3.cust_no and
E         - exists (
E         - select x.emp_no
E         - from employee x
E         - where
E         - x.job_country = c3.country
E         - )
E         - )
E         - Subqueries that are correlated to non-parent; for example,
E         - subquery SQ3 is contained by SQ2 (parent of SQ3) and SQ2 in turn is contained
E         - by SQ1 and SQ3 is correlated to tables defined in SQ1.
E         - Sub-query
E         - ....-> Filter
E         - ........-> Table "EMPLOYEE" as "X" Full Scan
E         - Sub-query
E         - ....-> Filter (preliminary)
E         - ........-> Filter
E         - ............-> Table "SALES" as "S3" Access By ID
E         - ................-> Bitmap
E         - ....................-> Index "SALES_CUSTOMER_FK_CUST_NO" Range Scan (full match)
E         - Select Expression
E         - ....-> Filter
E         - ........-> Table "CUSTOMER" as "C3" Full Scan
E         - 2000
E         - select c3.cust_no
E         - from customer c3
E         - where exists (
E         - select s3.cust_no
E         - from sales s3
E         - where s3.cust_no = c3.cust_no
E         - group by s3.cust_no
E         - )
E         - A group-by subquery is correlated; in this case, unnesting implies doing join
E         - after group-by. Changing the given order of the two operations may not be always legal.
E         - Sub-query
E         - ....-> Aggregate
E         - ........-> Filter
E         - ............-> Table "SALES" as "S3" Access By ID
E         - ................-> Index "SALES_CUSTOMER_FK_CUST_NO" Range Scan (full match)
E         - Select Expression
E         - ....-> Filter
E         - ........-> Table "CUSTOMER" as "C3" Full Scan
E         - 3000
E         - select s1.cust_no
E         - from sales s1
E         - where exists (
E         - select 1 from customer c1 where s1.cust_no = c1.cust_no
E         - union all
E         - select 1 from employee x1 where s1.sales_rep = x1.emp_no
E         - )
E         - For disjunctive subqueries, the outer columns in the connecting
E         - or correlating conditions are not the same.
E         - Sub-query
E         - ....-> Union
E         - ........-> Filter
E         - ............-> Table "CUSTOMER" as "C1" Access By ID
E         - ................-> Bitmap
E         - ....................-> Index "CUSTOMER_PK" Unique Scan
E         - ........-> Filter
E         - ............-> Table "EMPLOYEE" as "X1" Access By ID
E         - ................-> Bitmap
E         - ....................-> Index "EMPLOYEE_PK" Unique Scan
E         - Select Expression
E         - ....-> Filter
E         - ........-> Table "SALES" as "S1" Full Scan
E         - 4000
E         - select x1.emp_no
E         - from employee x1
E         - where
E         - (
E         - x1.job_country = 'USA' or
E         - exists (
E         - select 1
E         - from sales s1
E         - where s1.sales_rep = x1.emp_no
E         - )
E         - )
E         - An `OR` condition in compound WHERE expression, see https://jonathanlewis.wordpress.com/2007/02/26/subquery-with-or/
E         - Sub-query
E         - ....-> Filter
E         - ........-> Table "SALES" as "S1" Access By ID
E         - ............-> Bitmap
E         - ................-> Index "SALES_EMPLOYEE_FK_SALES_REP" Range Scan (full match)
E         - Select Expression
E         - ....-> Filter
E         - ........-> Table "EMPLOYEE" as "X1" Full Scan

tests/bugs/gh_8061_addi_test.py:225: AssertionError
Full history of outcomes and elapsed time, ms:
NN SNAP_INFO CS_outcome SS_outcome CS_run_time SS_run_time CS_run_beg CS_run_end SS_run_beg SS_run_end
1 6.0.0.881 2025.06.27 7035d F F 716 671 2025.06.30 02:03:33.501 2025.06.30 02:03:34.217 2025.06.29 23:19:05.703 2025.06.29 23:19:06.374
2 6.0.0.877 2025.06.26 8e38f F F 704 591 2025.06.27 01:42:36.314 2025.06.27 01:42:37.018 2025.06.26 23:10:07.479 2025.06.26 23:10:08.070
3 6.0.0.876 2025.06.25 b1bec F F 623 503 2025.06.26 01:46:26.878 2025.06.26 01:46:27.501 2025.06.25 23:12:02.091 2025.06.25 23:12:02.594
4 6.0.0.863 2025.06.24 c3c20 F F 658 620 2025.06.25 01:46:44.764 2025.06.25 01:46:45.422 2025.06.24 23:11:46.734 2025.06.24 23:11:47.354
5 6.0.0.858 2025.06.23 8d6f7 F F 679 600 2025.06.24 01:47:05.988 2025.06.24 01:47:06.667 2025.06.23 23:11:55.522 2025.06.23 23:11:56.122
6 6.0.0.849 2025.06.20 7b79c F F 666 664 2025.06.21 01:58:38.809 2025.06.21 01:58:39.475 2025.06.20 23:21:07.295 2025.06.20 23:21:07.959
7 6.0.0.848 2025.06.19 c483c F F 736 561 2025.06.20 01:54:59.251 2025.06.20 01:54:59.987 2025.06.19 23:17:55.105 2025.06.19 23:17:55.666
8 6.0.0.845 2025.06.18 22b12 F F 772 760 2025.06.19 02:03:39.020 2025.06.19 02:03:39.792 2025.06.18 23:21:02.099 2025.06.18 23:21:02.859
9 6.0.0.843 2025.06.16 995f4 F F 649 340 2025.06.18 02:01:53.953 2025.06.18 02:01:54.602 2025.06.17 23:23:21.117 2025.06.17 23:23:21.457
10 6.0.0.840 2025.06.14 29bca F F 690 468 2025.06.16 01:53:42.090 2025.06.16 01:53:42.780 2025.06.15 23:15:20.266 2025.06.15 23:15:20.734
11 6.0.0.838 2025.06.13 0e28a F F 743 656 2025.06.14 02:06:44.548 2025.06.14 02:06:45.291 2025.06.13 23:22:58.031 2025.06.13 23:22:58.687
12 6.0.0.835 2025.06.12 2cf29 F F 674 414 2025.06.13 02:06:43.122 2025.06.13 02:06:43.796 2025.06.12 23:27:05.279 2025.06.12 23:27:05.693
13 6.0.0.834 2025.06.11 e889f F F 793 443 2025.06.12 02:01:54.877 2025.06.12 02:01:55.670 2025.06.11 23:23:11.978 2025.06.11 23:23:12.421
14 6.0.0.800 2025.06.10 1f226 P P 1816 1999 2025.06.11 00:28:42.154 2025.06.11 00:28:43.970 2025.06.10 22:21:17.367 2025.06.10 22:21:19.366
15 6.0.0.799 2025.06.07 be644 P P 2150 1176 2025.06.10 00:30:22.389 2025.06.10 00:30:24.539 2025.06.09 22:20:52.946 2025.06.09 22:20:54.122
16 6.0.0.797 2025.06.06 303e8 P P 1143 1964 2025.06.07 00:34:06.259 2025.06.07 00:34:07.402 2025.06.06 22:20:25.174 2025.06.06 22:20:27.138
17 6.0.0.795 2025.05.29 7a71a P P 1076 858 2025.06.06 00:28:57.131 2025.06.06 00:28:58.207 2025.06.05 22:19:34.951 2025.06.05 22:19:35.809
18 6.0.0.792 2025.05.28 b4327 P P 2061 1670 2025.05.29 00:42:49.170 2025.05.29 00:42:51.231 2025.05.28 22:22:29.376 2025.05.28 22:22:31.046
19 6.0.0.791 2025.05.27 02db8 P P 1324 1746 2025.05.28 00:40:05.371 2025.05.28 00:40:06.695 2025.05.27 22:21:34.222 2025.05.27 22:21:35.968
20 6.0.0.789 2025.05.21 64051 P P 1105 949 2025.05.25 00:32:47.178 2025.05.25 00:32:48.283 2025.05.24 22:20:48.298 2025.05.24 22:20:49.247
21 6.0.0.787 2025.05.20 230ad P P 1056 1429 2025.05.21 00:29:54.895 2025.05.21 00:29:55.951 2025.05.20 22:19:11.809 2025.05.20 22:19:13.238
22 6.0.0.783 2025.05.12 37320 P P 1835 1413 2025.05.19 12:03:17.476 2025.05.19 12:03:19.311 2025.05.19 10:07:59.398 2025.05.19 10:08:00.811
23 6.0.0.779 2025.05.11 136fa P P 2288 1324 2025.05.12 00:25:04.306 2025.05.12 00:25:06.594 2025.05.11 22:18:43.386 2025.05.11 22:18:44.710
24 6.0.0.778 2025.05.07 d735e P P 1145 898 2025.05.08 00:27:19.172 2025.05.08 00:27:20.317 2025.05.07 22:17:37.631 2025.05.07 22:17:38.529
25 6.0.0.776 2025.05.06 007cd P P 2167 829 2025.05.07 00:21:33.216 2025.05.07 00:21:35.383 2025.05.06 22:17:33.725 2025.05.06 22:17:34.554
26 6.0.0.770 2025.05.05 82c4a P P 2159 854 2025.05.06 00:20:45.546 2025.05.06 00:20:47.705 2025.05.05 22:16:48.852 2025.05.05 22:16:49.706
27 6.0.0.767 2025.05.01 cdd29 P P 1119 928 2025.05.02 00:18:10.159 2025.05.02 00:18:11.278 2025.05.01 22:16:19.657 2025.05.01 22:16:20.585
28 6.0.0.762 2025.04.30 5cb15 P P 1132 1801 2025.05.01 00:14:17.402 2025.05.01 00:14:18.534 2025.04.30 22:15:04.906 2025.04.30 22:15:06.707
29 6.0.0.755 2025.04.29 739c6 P P 1084 1427 2025.04.30 00:16:58.079 2025.04.30 00:16:59.163 2025.04.29 22:16:22.006 2025.04.29 22:16:23.433
30 6.0.0.753 2025.04.27 29ab3 P P 2262 933 2025.04.28 00:18:58.138 2025.04.28 00:19:00.400 2025.04.27 22:15:43.962 2025.04.27 22:15:44.895
31 6.0.0.745 2025.04.21 78ad8 P P 1049 1089 2025.04.26 00:14:59.082 2025.04.26 00:15:00.131 2025.04.25 22:17:05.229 2025.04.25 22:17:06.318
32 6.0.0.744 2025.04.19 e883a P P 1119 801 2025.04.20 00:17:03.432 2025.04.20 00:17:04.551 2025.04.19 22:16:36.190 2025.04.19 22:16:36.991
33 6.0.0.742 2025.04.17 abc3b P P 2004 872 2025.04.19 00:18:52.650 2025.04.19 00:18:54.654 2025.04.18 22:16:53.398 2025.04.18 22:16:54.270

Elapsed time, ms. Chart for last 33 runs:

Last commits information (all timestamps in UTC):