public static function groupBy($field)
    {
        if (!(gettype($field)=="string" || $field instanceof Key || $field instanceof Raw)) {
            throw new ClusterpointException("\"->group()\" function: passed field selector is not in valid format.", 9002);
        }
        if ($field instanceof Key) {
            $field =  self::field("{$field}");
        }
        return "{$field}";
    }