[SPARK-34012][SQL][3.0] Keep behavior consistent when conf spark.sqllegacy.parser.havingWithoutGroupByAsWhere is true with migration guide
#31049
+77
−2