def distinct(self, distinct_fields=None):
        """
        Returns the DISTINCT rows matched by this query.

        distinct_fields default to the partition key fields if not specified.

        *Note: distinct_fields must be a partition key or a static column*

        .. code-block:: python

            class Automobile(Model):
                manufacturer = columns.Text(partition_key=True)
                year = columns.Integer(primary_key=True)
                model = columns.Text(primary_key=True)
                price = columns.Decimal()

            sync_table(Automobile)

            # create rows

            Automobile.objects.distinct()

            # or

            Automobile.objects.distinct(['manufacturer'])

        """

        clone = copy.deepcopy(self)
        if distinct_fields:
            clone._distinct_fields = distinct_fields
        else:
            clone._distinct_fields = [x.column_name for x in self.model._partition_keys.values()]

        return clone
def distinct ( self , distinct_fields = None ) : clone = copy . deepcopy ( self ) if distinct_fields : clone . _distinct_fields = distinct_fields else : clone . _distinct_fields = [ x . column_name for x in self . model . _partition_keys . values ( ) ] return clone
Returns the DISTINCT rows matched by this query.

        distinct_fields default to the partition key fields if not specified.

        *Note: distinct_fields must be a partition key or a static column*

        .. code-block:: python

            class Automobile(Model):
                manufacturer = columns.Text(partition_key=True)
                year = columns.Integer(primary_key=True)
                model = columns.Text(primary_key=True)
                price = columns.Decimal()

            sync_table(Automobile)

            # create rows

            Automobile.objects.distinct()

            # or

            Automobile.objects.distinct(['manufacturer'])