• Vicențiu Ciorbaru's avatar
    Fix another bug in dense_rank. · 3dd08a11
    Vicențiu Ciorbaru authored
    When ordering by a column and partitioning by another, we must reset the
    peer_tracker for dense_rank, regardless if the value for the order
    column changes or not.
    
    Example:
    select a, b, dense_rank() over (partition by b order by a)
    a  |  b  |  dense_rank
    ----------------------
    1  | p1  |           1
    2  | p1  |           2
    2  | p2  |           1   // Here, without this fix we returned 0.
    2  | p2  |           2   // And 1 here.
    3dd08a11
win_rank.result 1.88 KB