Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
Reviewed
-
Allow the syntax of position alias in groupby expression.
Description
It would be nice if group by allowed either column aliases or column position (like mysql).
It can be burdensome to have to repeat UDFs both in the select and in the group by.
e.g. instead of:
select f1(col1), f2(col2), f3(col3), count(1) group by f1(col1), f2(col2), f3(col3);
it would allow:
select f1(col1), f2(col2), f3(col3), count(1) group by 1, 2, 3;