Fix hasPartitions method for dimension only queries