sort using spark key sorting