diff --git a/Test/Test.hs b/Test/Test.hs index 946113fc..98fb393c 100644 --- a/Test/Test.hs +++ b/Test/Test.hs @@ -632,6 +632,15 @@ testStringArrayAggregateOrderedDistinct = it "" $ q `selectShouldReturnSorted` e ] sortedData = L.sortBy (Ord.comparing snd) table7data +testStringArrayAggregateOrderedDistinct2 :: Test +testStringArrayAggregateOrderedDistinct2 = it "" $ q `selectShouldReturnSorted` expected + where q = O.aggregateOrdered + (O.asc snd) + (O.distinctAggregator (PP.p2 (O.groupBy, O.arrayAgg_))) + table7Q + expected :: [(String, [String])] + expected = [("bar",["a"]),("baz",["b"]),("foo",["c"])] + -- See -- -- https://github.com/tomjaguarpaw/haskell-opaleye/pull/578#issuecomment-1782638274 @@ -1574,6 +1583,7 @@ main = do testMultipleAggregateOrdered testStringArrayAggregateOrdered testStringArrayAggregateOrderedDistinct + testStringArrayAggregateOrderedDistinct2 testStringArrayAggregateOrderedDistinctDuplicateFields testDistinctAndAggregate testDoubleAggregate