[WIP][SPARK-3860][SQL] Improved dimension join support.

**This is an initial draft intended only for early feedback**

Follow up of #2985