S02017

Error Code

S02017

Error Message

Invalid grouping column. RefId:S02017

Probable Causes

This error occurs when the number of rows in grouping column does not match the number of rows in the SELECT column.

For example, oneRow(grp) following the GROUP BY produces only one row, while the SELECT column "grp" holds two rows.

def oneRow(col){
    return col[0]
}
t = table([1,1] as grp)
select sum(grp)from t group by oneRow(grp)

Solutions

Ensure that the grouping column is a vector that has the same size as the SELECT column.