Merge lp:~wgrant/storm/distinct-on into lp:storm
Proposed by
William Grant
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Thomas Herve | ||||
Approved revision: | 391 | ||||
Merged at revision: | 392 | ||||
Proposed branch: | lp:~wgrant/storm/distinct-on | ||||
Merge into: | lp:storm | ||||
Diff against target: |
81 lines (+26/-10) 4 files modified
NEWS (+8/-6) storm/expr.py (+5/-2) storm/store.py (+3/-2) tests/expr.py (+10/-0) |
||||
To merge this branch: | bzr merge lp:~wgrant/storm/distinct-on | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Thomas Herve (community) | Approve | ||
Данило Шеган (community) | Approve | ||
Review via email: mp+60582@code.launchpad.net |
Description of the change
This (surprisingly small) branch adds DISTINCT ON support. Select()'s distinct argument has traditionally been a boolean, so it seemed safe and sensible enough to allow it to optionally take a list of columns to imply DISTINCT ON. I opted to use raw=True, as is already used for the other Select arguments.
To post a comment you must log in.
Does it make sense to have a test to confirm it works properly for multi-table selects and distinct on a column which is not included in the select columns?
Otherwise, looks pretty good.