ScalaSQL: WithCte.filter puts the WHERE clause inside the CTE, not the outer query
Confirmed · medium · Wrong-result bug
WithCte.filter swaps its arguments, so the WHERE clause lands in the CTE definition. Plain filters return the same rows, but filters applied after limits or aggregates on the CTE can change the result.
Found: ; reported: ; status since: . Reporter: Mike Murunov
Page for this report · Public report
Let's beef up the tests as part of this. The suggested fix makes sense to me.