def get_extra_select(self, order_by, select):
    extra_select = []
    select_sql = [t[1] for t in select]
    if (self.query.distinct and (not self.query.distinct_fields)):
        for (expr, (sql, params, is_ref)) in order_by:
            without_ordering = self.ordering_parts.search(sql).group(1)
            if ((not is_ref) and ((without_ordering, params) not in select_sql)):
                extra_select.append((expr, (without_ordering, params), None))
    return extra_select
def get_extra_select(self, order_by, select):
    extra_select = []
    select_sql = [t[1] for t in select]
    if (self.query.distinct and (not self.query.distinct_fields)):
        for (expr, (sql, params, is_ref)) in order_by:
            without_ordering = self.ordering_parts.search(sql).group(1)
            if ((not is_ref) and ((without_ordering, params) not in select_sql)):
                extra_select.append((expr, (without_ordering, params), None))
    return extra_select