Some questions related to your comment:

1. In the original post, a blogpost was referenced where partition filtering was added not as a WHERE clause in a subquery (as you suggest), but in the ON clause of the MERGE INTO statement. Do you mean that the solution in the orginal blogpost is wrong then? 

2. Databricks now recommends liquid clustering instead of partitioning on Delta tables. Does this have any impact on the optimal code for running merges or should it stay the same?