assert   
    select
    r.relationname,
    rc.relationid,
    rc.categoryid,
    c.description
    from
    relations r
    full join relationcategories rc on (rc.relationid = r.relationid)
    full join categories c on (c.categoryid = rc.categoryid)
    where
    rc.categoryid is null and c.categoryid >= 1
    UNION ALL --- :::::::   U N I O N    A L L  :::::::
    select
    r.relationname,
    rc.relationid,
    rc.categoryid,
    c.description
    from
    relations r
    full join relationcategories rc on (rc.relationid = r.relationid)
    full join categories c on (c.categoryid = rc.categoryid)
    where
    rc.relationid is null and r.relationid >= 1
    Select Expression
    ....-> Union
    ........-> Filter
    ............-> Nested Loop Join (outer)
    ................-> Filter
    ....................-> Table "CATEGORIES" as "C" Access By ID
    ........................-> Bitmap
    ............................-> Index "PK_CATEGORIES" Range Scan (lower bound: 1/1)
    ................

[...SKIPPED...]

..................-> Index "PK_CATEGORIES" Unique Scan
2026-04-24 19:10:50.625 E         + ............................-> Index "PK_CATEGORIES" Unique Scan
2026-04-24 19:10:50.635 E           RELATIONNAME : None
2026-04-24 19:10:50.640 E           RELATIONID : None
2026-04-24 19:10:50.645 E           CATEGORYID : None
2026-04-24 19:10:50.649 E           DESCRIPTION : newsletter
2026-04-24 19:10:50.654 E           RELATIONNAME : folding air-hook shop
2026-04-24 19:10:50.659 E           RELATIONID : None
2026-04-24 19:10:50.664 E           CATEGORYID : None
2026-04-24 19:10:50.669 E           DESCRIPTION : None
2026-04-24 19:10:50.674
2026-04-24 19:10:50.679 tests/functional/arno/optimizer/test_opt_full_join_04.py:351: AssertionError
2026-04-24 19:10:50.684 ---------------------------- Captured stdout setup -----------------------------
2026-04-24 19:10:50.689 Creating db: localhost:/var/tmp/qa_2024/test_11804/test.fdb [page_size=None, sql_dialect=None, charset='NONE', user=SYSDBA, password=masterkey]