private function prepareField($field, bool $join = true)
    {
        if ($field == '*') {
            return $field;
        }

        if ($field instanceof Builder || $field instanceof Sql) {
            return '('. $field->toString() .')';
        } elseif ($field instanceof Identifier) {
            return $this->agent->escapeIdentifier($field);
        }

        if (is_string($field)) {
            $field = Util::split(',', trim($field));
        }

        if (is_array($field)) {
            return $this->agent->escapeIdentifier($field, $join);
        }

        throw new BuilderException(sprintf('String, array or Builder type fields are accepted only,'.
            ' %s given', gettype($field)));
    }