if groupBy can be null here  the call further above in visitQuerySpecification would have caused a NPE ?