Description
The group only condition should check if the aggregate expression is empty.
In DataFrame api, it is allowed to make a empty aggregations.
So the following query should return 1 rather than 0 because it's a global aggregate.
val emptyAgg = Map.empty[String, String] spark.range(2).where("id > 2").agg(emptyAgg).limit(1).count