I know there is one more patch beside the partitionwise join fix, but I've set the title to suggest that this is related mainly to partitionwise joins.
Thank you for working on this. Currently partitionwise join does not take COALESCE expr into consideration when matching to partition keys. This is a problem.