SPARK-3462 add tests, handle compatible schema with different aliases, per marmbrus feedback