[SPARK-3455] [SQL] **HOT FIX** Fix the unit test failure

Unit test failed due to can not resolve the attribute references.