Please sign in to comment.
More consistent Query.length (“COUNT(*)”) semantics:
Counting any multi-column collection is now interpreted as COUNT(1), i.e. it ignores nullability of the columns. The previous approach of picking a random column led to inconsistent results. Note that this changes the semantics of counting only one side of an outer join, where the previous goal was not to include non-matching rows in the total (equivalent to counting the discriminator column). This does not make sense anymore for the new outer join operators with correct Option types. The new semantics are identical to those of Scala collections. The old semantics remain for counts of single columns for now. New test in CountTest.testTableCount, modified results for q6 in AggregateTest.testGroupBy to reflect the new semantics. Fixes #1237.
- Loading branch information...
Showing with 36 additions and 10 deletions.
- +1 −1 slick-testkit/src/main/scala/com/typesafe/slick/testkit/tests/AggregateTest.scala
- +18 −0 slick-testkit/src/main/scala/com/typesafe/slick/testkit/tests/CountTest.scala
- +4 −2 slick/src/main/scala/slick/compiler/CreateAggregates.scala
- +2 −7 slick/src/main/scala/slick/memory/QueryInterpreter.scala
- +11 −0 slick/src/sphinx/upgrade.rst