I have fixed the issues which were marked as TODOs in the attached patches. Also, I have included your test change patch in my series of patches. Are there any other issues you have commented out?
Thanks Ashutosh, All commented issue got fixed. I am working on some combinations of N-way joins to test partition matching, will send those as well once done.