Request for review - #14154

I know it’s late in the 4.1.0 release cycle, but I was hoping somebody could review this for that release:

It fixes an issue where default_scopes in ON clauses don’t pick up the table’s aliased name. Without the patch, the resulting queries are generally valid SQL but return incorrect results.

I’d also appreciate any insight people can put on #14155, but that’s lower priority since it’s been broken in the same fashion since 3.x.


—Matt Jones