Add part of support for outer join query. Clean up the filter extracting part for mv partititioned table queries