fix grouping with expression in key(s)

- remove spurious rewriting of the source in groupBy
- simplify expr3 with at least one literal argument
- pending test for a trickier case
There are duplicates in the result set because it’s not a SELECT DISTINCT, so the result set will be equal in size to the zips set — right?


-- 
John A. De Goes
Follow me @jdegoes

On December 23, 2014 at 8:28:45 AM, Moss Prescott (notifications@github.com) wrote:

In it/src/test/resources/tests/groupByExpression.test:

> @@ -0,0 +1,15 @@
> +{
> +  "name": "group by a computed value",
> +
> +  "data": "zips.data",
> +
> +  "query": "select substring(city, 0, 1) as \"first\", count(*) as numZips from zips group by substring(city, 0, 1) order by count(*) desc",
> +
> +  "predicate": "containsAtLeast",
That's a good point, and a huge improvement, especially for some of @sellout's tests. In this case, there are just 26 result values, so I was actually tempted to use containsExactly.

—
Reply to this email directly or view it on GitHub.