function support case when and sort support any column

next the mutli-pthreads will be supported and then is the distributed sort.