You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suppress selection item aliasing for the actual count query.
We now no longer apply count selection filtering but rather skip select field aliasing when rendering a count query to drop the field alias within a count query.
Previously, we removed field aliasing by filtering the token stream which also removed the AS keyword from cast operators.
Closes: #3536
Original Pull Request: #3553
assertCountQuery("select distinct 1 as x from Employee","select count(distinct 1) from Employee AS __");
1039
1056
assertCountQuery("SELECT DISTINCT abc AS x FROM T","SELECT count(DISTINCT abc) FROM T AS __");
1040
-
assertCountQuery("select distinct a as x, b as y from Employee","select count(distinct a, b) from Employee AS __");
1057
+
assertCountQuery("select distinct a as x, b as y from Employee","select count(distinct a, b) from Employee AS __");
1041
1058
assertCountQuery("select distinct sum(amount) as x from Employee GROUP BY n","select count(distinct sum(amount)) from Employee AS __ GROUP BY n");
1042
-
assertCountQuery("select distinct a, b, sum(amount) as c, d from Employee GROUP BY n","select count(distinct a, b, sum(amount), d) from Employee AS __ GROUP BY n");
1059
+
assertCountQuery("select distinct a, b, sum(amount) as c, d from Employee GROUP BY n","select count(distinct a, b, sum(amount), d) from Employee AS __ GROUP BY n");
1043
1060
assertCountQuery("select distinct a, count(b) as c from Employee GROUP BY n","select count(distinct a, count(b)) from Employee AS __ GROUP BY n");
0 commit comments