hnsl/colpivot

duplicates rows

nheeren opened this issue · 1 comments

Hi there. Nice function. Just found it on Stackoverflow...
However, I get duplicate rows in some cases. Unfortunately I could not create a test case... My query:

select colpivot('_test_pivoted', 'select * from input_data.building_elements',
array['type','constr_style'], array['year'], '#.market_share', null);

select * from _test_pivoted order by type, constr_style;

Any hints would be appreciated.

Ok - sorry. There was an actual duplicate in my data but only for one of the years. However, it then popped up as a false duplicate for the other years...