hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 孙志禹 <>
Subject [Questio]Which record does Hive give the bigger number when I use row_number
Date Wed, 11 Oct 2017 14:33:03 GMT
Dear all,   Thanks since it's the first time for me to have a honor to ask questions here.   
I used the hql script below:
    -- ---------------------            select                 user_id 
              , cost_date  -- datetime                , cost  -- int 
              , row_number over( partition by user_id order by cost  ) as row_num 
          from table_A    -- ---------------------.     The question is, if
for a special user_id( e.g. user_id = '11111'),  there are two records with the same cost in
the table, and I know by using the function row_number Hive will give  different row_nums for
both records, so which one will get the bigger row_num?    Thanks! And it's also okay to
me if you give me a web-link which can give the answer.----    Anci Sun from China

View raw message