• Yuchen Pei's avatar
    MDEV-22534 Decorrelate IN subquery · a87f2277
    Yuchen Pei authored
    Transform
    
    in (select inner_col' from inner_table where inner_col = outer_col)
    
    to
    
    , outer_col in (select inner_col', inner_col from inner_table)
    
    Achieved by implementing Item_in_subselect::exists2in_processor(),
    accompanied with comprehensive test coverage. Factored out common code
    between the two transformations.
    
    Caveat:
    
    - Cannot recognise bad item mismatch in equalities that causes
      materialization to not materialize down the road
    a87f2277
item_subselect.cc 212 KB