You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the addition of ONLY_FULL_GROUP_BY option to the datajoint/mysql recently, there is increased need and priority for this feature as simple, single-table aggregations (e.g. summation of all values in a column) that were allowed before are no longer properly defined queries.
However, it will now (as intended) throw this error on database servers with the new option:
>> University.Student().proj('max(student_id) -> max_id')
ans =Objectdj.internal.GeneralRelvarErrorusing mymInaggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column'djtest_university.student.student_id'; thisis incompatible with sql_mode=only_full_group_byErrorin dj.Connection/query (line 183)
ret=mym(self.connId, queryStr, v{:});
Errorin dj.internal.GeneralRelvar/fetch (line 213)
ret =self.conn.query(sprintf('SELECT %s FROM %s%s', ...
Errorin dj.internal.GeneralRelvar/disp (line 89)
preview =self.fetch(attrList{:}, sprintf('LIMIT %d', maxRows+1));
The real solution for this will be to structure a query with the new universal set feature once completed. The workaround for now is to simply fetch and perform the aggregation client side until this enhancement is implemented.
No description provided.
The text was updated successfully, but these errors were encountered: