nck-2 / test-rep

0 stars 0 forks source link

sorting by groupby() doesn't work for json attributes #1326

Open githubmanticore opened 1 year ago

githubmanticore commented 1 year ago

See test_206, query 227

select count(*) as p, groupby() as q from loc1 group by j.uid order by q asc, p desc;

returns

  p    q 
    2    123 
    2    567 
    1    234 
    1    456 
    1    NULL 

The expressions that remaps json field to string gets evaluated after sorting, thus no sorting by q