CRM_Utils_SQL_Select - Fix dedupe behavior for `select`, `groupBy`, `having`, `orderBy`.
authorCiviCRM <info@civicrm.org>
Wed, 6 Jan 2016 22:13:30 +0000 (14:13 -0800)
committerCiviCRM <info@civicrm.org>
Wed, 6 Jan 2016 22:51:08 +0000 (14:51 -0800)
commit6e6685dcd15788683848a2aec52534edb1e279e0
tree813e114dacbb6817a79a05f94c266ae8b628506e
parent5275a1e830e5b639d459be6541202faf88f4fedb
CRM_Utils_SQL_Select - Fix dedupe behavior for `select`, `groupBy`, `having`, `orderBy`.

The selected columns should not be deduped at all -- when using `insertInto()`, the selected
columns need to line up with the insertion columns, and it's perfectly reasonably to re-use
the same value in multipl columns.

For th others, it's semantically OK to dedupe, but we should dedupe based on
the evaluated query expression rather than the general formula.
CRM/Utils/SQL/Select.php
tests/phpunit/CRM/Utils/SQL/SelectTest.php