Skip to content

Commit ac7f672

Browse files
committed
Remove DISTINCT from make_sql
1 parent 0d72a38 commit ac7f672

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

datajoint/expression.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,7 @@ def make_sql(self, fields=None):
106106
Make the SQL SELECT statement.
107107
:param fields: used to explicitly set the select attributes
108108
"""
109-
distinct = self.heading.names == self.primary_key
110-
return 'SELECT {distinct}{fields} FROM {from_}{where}'.format(
111-
distinct="DISTINCT " if distinct else "",
109+
return 'SELECT {fields} FROM {from_}{where}'.format(
112110
fields=self.heading.as_sql(fields or self.heading.names),
113111
from_=self.from_clause(), where=self.where_clause())
114112

tests/test_fetch.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,4 +296,3 @@ def test_fetch_group_by(self):
296296
# This command is confirmed to work in v0.12.9 but not in v0.13.2
297297

298298
Parent().fetch('KEY', order_by='name')
299-

0 commit comments

Comments
 (0)