pivot in spark sql example