sql may fail with distinct columns in having statement

    presto:default> select rank, count(distinct cityid) from dim.city group by rank having count(distinct cityid) > 30;
    Query 20140305_114830_00009_jvyte failed: Multiple entries with same key: count_1=cityid$distinct and count_1=cityid$distinct