working version of amplab q3 for spark sql
merge