Hadoop Pig Ordered Analytical Functions
问题 I am new in Pig and would like to use an ordered analytical function, similar to what is possible in SQL. My data looks something like this: (stock_symbol,date,stock_price_open,stock_price_close) (TAC,2001-08-06,16.39,16.36) (TAC,2001-08-07,16.3,16.54) (TAC,2001-08-08,16.55,16.44) (TAC,2001-08-09,16.45,16.48) (TAC,2001-08-10,16.5,15.8) What I want to do is find the change in opening stock price from day to day. So, my output would look something like this: (stock_symbol,date,stock_price_open