The following query parses in branch-2.2, but doesn't parse correctly as of today's master:
It still parses if you name the subquery in the FROM clause:
In master, this gives the following error:
It looks like this change is intentional due to
SPARK-20690, but the error message that we give here isn't very clear. I think that we should improve it so as not to confuse users.