[SPARK-8116][PYSPARK] Allow sc.range() to take a single argument.
[SPARK-8116][PYSPARK] Allow sc.range() to take a single argument.

Author: Ted Blackman <ted.blackman@gmail.com>

Closes #6656 from belisarius222/branch-1.4 and squashes the following commits:

747cbc2 [Ted Blackman] [SPARK-8116][PYSPARK] Allow sc.range() to take a single argument.

(cherry picked from commit f02af7c8f7f43e4cfe3c412d2b5ea4128669ce22)
Signed-off-by: Reynold Xin <c9d35a384bc579d1c6c8c055f2a2b5c04e11b521@databricks.com>

zero323/spark,mzl9039/spark,Panos-Bletsos/spark-cost-model-optimizer,shaneknapp/spark,wangmiao1981/spark,nchammas/spark,huang1900/spark,patrick-nicholson/spark,BryanCutler/spark,mahak/spark,JerryLead/spark,minixalpha/spark,brad-kaiser/spark,eyalfa/spark,eyalfa/spark,aosagie/spark,liutang123/spark,wzhfy/spark,sachintyagi22/spark,setjet/spark,Panos-Bletsos/spark-cost-model-optimizer,gioenn/xSpark,rikima/spark,mdespriee/spark,lxsmnv/spark,kissmetrics/spark,esi-mineset/spark,dhruve/spark,cloud-fan/spark,aosagie/spark,cin/spark,esi-mineset/spark,LantaoJin/spark,huang1900/spark,markhamstra/spark,bOOm-X/spark,chuckchen/spark,maropu/spark,maropu/spark,ConeyLiu/spark,maropu/spark,aray/spark,facaiy/spark,mahak/spark,stanzhai/spark,nilsgrabbert/spark,sachintyagi22/spark,nchammas/spark,SHASHANKB/spark,bOOm-X/spark,rikima/spark,patrick-nicholson/spark,rekhajoshm/spark,pronix/spark,minixalpha/spark,pgandhi999/spark,UndeadBaneGitHub/spark,jlopezmalla/spark,ron8hu/spark,bOOm-X/spark,joseph-torres/spark,wangmiao1981/spark,liutang123/spark,bravo-zhang/spark,yanboliang/spark,milliman/spark,SHASHANKB/spark,liutang123/spark,wzhfy/spark,stanzhai/spark,ajaysaini725/spark,map222/spark,darionyaphet/spark,MLnick/spark,apache-spark-on-k8s/spark,ajaysaini725/spark,saturday-shi/spark,aokolnychyi/spark,hhbyyh/spark,pgandhi999/spark,hhbyyh/spark,someorz/spark,techaddict/spark,WeichenXu123/spark,rezasafi/spark,publicRoman/spark,saturday-shi/spark,ConeyLiu/spark,esi-mineset/spark,cloud-fan/spark,vinodkc/spark,alunarbeach/spark,aray/spark,kiszk/spark,kevinyu98/spark,hvanhovell/spark,HyukjinKwon/spark,zuotingbing/spark,HyukjinKwon/spark,tejasapatil/spark,poffuomo/spark,ericvandenbergfb/spark,liyichao/spark,bravo-zhang/spark,highfei2011/spark,markhamstra/spark,chuckchen/spark,huang1900/spark,JoshRosen/spark,shuangshuangwang/spark,saltstar/spark,shuangshuangwang/spark,jlopezmalla/spark,highfei2011/spark,JerryLead/spark,publicRoman/spark,xflin/spark,zhouyejoe/spark,sureshthalamati/spark,dhruve/spark,sahilTakiar/spark,poffuomo/spark,shuangshuangwang/spark,jiangxb1987/spark,tengpeng/spark,rednaxelafx/apache-spark,panfengfeng/spark,dbtsai/spark,ConeyLiu/spark,MLnick/spark,ueshin/apache-spark,publicRoman/spark,nchammas/spark,mahak/spark,pronix/spark,dongjoon-hyun/spark,gioenn/xSpark,holdenk/spark,srowen/spark,rednaxelafx/apache-spark,skonto/spark,ahnqirage/spark,WindCanDie/spark,jlopezmalla/spark,alunarbeach/spark,jiangxb1987/spark,pgandhi999/spark,actuaryzhang/spark,tengpeng/spark,ptkool/spark,akopich/spark,map222/spark,eyalfa/spark,HyukjinKwon/spark,ibm-research-ireland/sparkoscope,WeichenXu123/spark,mzl9039/spark,sahilTakiar/spark,nilsgrabbert/spark,stanzhai/spark,zero323/spark,hhbyyh/spark,techaddict/spark,Panos-Bletsos/spark-cost-model-optimizer,vinodkc/spark,joseph-torres/spark,publicRoman/spark,mzl9039/spark,SHASHANKB/spark,brad-kaiser/spark,witgo/spark,ibm-research-ireland/sparkoscope,hhbyyh/spark,aosagie/spark,ericvandenbergfb/spark,WindCanDie/spark,holdenk/spark,zzcclp/spark,SnappyDataInc/spark,taroplus/spark,techaddict/spark,rikima/spark,guoxiaolongzte/spark,gioenn/xSpark,SnappyDataInc/spark,JoshRosen/spark,kevinyu98/spark,alunarbeach/spark,byakuinss/spark,facaiy/spark,milliman/spark,dongjoon-hyun/spark,jianran/spark,panfengfeng/spark,ibm-research-ireland/sparkoscope,hvanhovell/spark,ioana-delaney/spark,shubhamchopra/spark,ioana-delaney/spark,Panos-Bletsos/spark-cost-model-optimizer,eyalfa/spark,rikima/spark,liutang123/spark,nilsgrabbert/spark,facaiy/spark,ericvandenbergfb/spark,jiangxb1987/spark,rikima/spark,icexelloss/spark,bdrillard/spark,liyichao/spark,pgandhi999/spark,kevinyu98/spark,lxsmnv/spark,jkbradley/spark,narahari92/spark,michalsenkyr/spark,narahari92/spark,srowen/spark,nilsgrabbert/spark,zuotingbing/spark,Aegeaner/spark,rekhajoshm/spark,alunarbeach/spark,janewangfb/spark,minixalpha/spark,zzcclp/spark,panfengfeng/spark,jiangxb1987/spark,wangmiao1981/spark,narahari92/spark,ioana-delaney/spark,darionyaphet/spark,joseph-torres/spark,aray/spark,UndeadBaneGitHub/spark,ueshin/apache-spark,darionyaphet/spark,actuaryzhang/spark,caneGuy/spark,bOOm-X/spark,shaneknapp/spark,hvanhovell/spark,ddna1021/spark,nchammas/spark,wzhfy/spark,adrian-ionescu/apache-spark,panfengfeng/spark,darionyaphet/spark,Aegeaner/spark,ueshin/apache-spark,witgo/spark,pgandhi999/spark,jlopezmalla/spark,ron8hu/spark,BryanCutler/spark,JerryLead/spark,zhouyejoe/spark,goldmedal/spark,ron8hu/spark,witgo/spark,andrewor14/spark,nlalevee/spark,sahilTakiar/spark,apache-spark-on-k8s/spark,LantaoJin/spark,saltstar/spark,setjet/spark,ddna1021/spark,tengpeng/spark,akopich/spark,HyukjinKwon/spark,vinodkc/spark,1haodian/spark,loneknightpy/spark,debugger87/spark,someorz/spark,JerryLead/spark,apache/spark,apache/spark,milliman/spark,kissmetrics/spark,shaneknapp/spark,goldmedal/spark,HyukjinKwon/spark,ueshin/apache-spark,milliman/spark,hvanhovell/spark,highfei2011/spark,andrewor14/spark,patrick-nicholson/spark,actuaryzhang/spark,xuanyuanking/spark,ioana-delaney/spark,ahnqirage/spark,haowu80s/spark,icexelloss/spark,mike0sv/spark,UndeadBaneGitHub/spark,caneGuy/spark,bdrillard/spark,debugger87/spark,1haodian/spark,xflin/spark,cin/spark,skonto/spark,markhamstra/spark,big-pegasus/spark,JoshRosen/spark,BryanCutler/spark,vinodkc/spark,sahilTakiar/spark,stanzhai/spark,kiszk/spark,techaddict/spark,jrshust/spark,aosagie/spark,taroplus/spark,ddna1021/spark,UndeadBaneGitHub/spark,sahilTakiar/spark,rekhajoshm/spark,SHASHANKB/spark,markhamstra/spark,apache-spark-on-k8s/spark,eyalfa/spark,rednaxelafx/apache-spark,JerryLead/spark,xuanyuanking/spark,xuanyuanking/spark,big-pegasus/spark,andrewor14/spark,kiszk/spark,minixalpha/spark,Panos-Bletsos/spark-cost-model-optimizer,kissmetrics/spark,adrian-ionescu/apache-spark,HyukjinKwon/spark,nlalevee/spark,aray/spark,panfengfeng/spark,1haodian/spark,wzhfy/spark,tengpeng/spark,spark-test/spark,skonto/spark,facaiy/spark,BryanCutler/spark,apache-spark-on-k8s/spark,ueshin/apache-spark,zero323/spark,hvanhovell/spark,bdrillard/spark,jianran/spark,ericvandenbergfb/spark,ueshin/apache-spark,rezasafi/spark,shaneknapp/spark,apache/spark,shubhamchopra/spark,LantaoJin/spark,BryanCutler/spark,publicRoman/spark,andrewor14/spark,bOOm-X/spark,rednaxelafx/apache-spark,ddna1021/spark,ajaysaini725/spark,kimoonkim/spark,ioana-delaney/spark,xflin/spark,akopich/spark,liyichao/spark,wangyum/spark,zhouyejoe/spark,ibm-research-ireland/sparkoscope,ConeyLiu/spark,nlalevee/spark,zzcclp/spark,1haodian/spark,cin/spark,SnappyDataInc/spark,akopich/spark,milliman/spark,actuaryzhang/spark,andrewor14/spark,highfei2011/spark,adrian-ionescu/apache-spark,jianran/spark,ddna1021/spark,mahak/spark,SnappyDataInc/spark,aokolnychyi/spark,WindCanDie/spark,dhruve/spark,Aegeaner/spark,1haodian/spark,metamx/spark,kissmetrics/spark,panfengfeng/spark,sachintyagi22/spark,brad-kaiser/spark,techaddict/spark,ioana-delaney/spark,chuckchen/spark,skonto/spark,michalsenkyr/spark,WeichenXu123/spark,maropu/spark,SnappyDataInc/spark,MLnick/spark,actuaryzhang/spark,janewangfb/spark,holdenk/spark,goldmedal/spark,zuotingbing/spark,dbtsai/spark,MLnick/spark,ConeyLiu/spark,big-pegasus/spark,ptkool/spark,kiszk/spark,ahnqirage/spark,rednaxelafx/apache-spark,sahilTakiar/spark,mahak/spark,liutang123/spark,gengliangwang/spark,bdrillard/spark,wangyum/spark,cloud-fan/spark,szhem/spark,wangyum/spark,LantaoJin/spark,sureshthalamati/spark,markhamstra/spark,vinodkc/spark,apache/spark,facaiy/spark,wangyum/spark,jkbradley/spark,saltstar/spark,shubhamchopra/spark,loneknightpy/spark,nchammas/spark,mahak/spark,someorz/spark,bravo-zhang/spark,jlopezmalla/spark,joseph-torres/spark,ahnqirage/spark,setjet/spark,jrshust/spark,zuotingbing/spark,witgo/spark,witgo/spark,goldmedal/spark,byakuinss/spark,dbtsai/spark,JerryLead/spark,facaiy/spark,JerryLead/spark,ericvandenbergfb/spark,someorz/spark,JoshRosen/spark,ioana-delaney/spark,esi-mineset/spark,kimoonkim/spark,chuckchen/spark,ibm-research-ireland/sparkoscope,zero323/spark,janewangfb/spark,xflin/spark,tejasapatil/spark,cloud-fan/spark,cin/spark,dhruve/spark,loneknightpy/spark,wzhfy/spark,brad-kaiser/spark,brad-kaiser/spark,HyukjinKwon/spark,mike0sv/spark,nchammas/spark,apache-spark-on-k8s/spark,bdrillard/spark,witgo/spark,map222/spark,gioenn/xSpark,MLnick/spark,gioenn/xSpark,rezasafi/spark,haowu80s/spark,aosagie/spark,gengliangwang/spark,WeichenXu123/spark,map222/spark,debugger87/spark,dhruve/spark,tejasapatil/spark,icexelloss/spark,sahilTakiar/spark,facaiy/spark,yanboliang/spark,LantaoJin/spark,jlopezmalla/spark,dhruve/spark,bravo-zhang/spark,byakuinss/spark,michalsenkyr/spark,dongjoon-hyun/spark,BryanCutler/spark,ptkool/spark,andrewor14/spark,publicRoman/spark,hhbyyh/spark,stanzhai/spark,WeichenXu123/spark,zuotingbing/spark,bravo-zhang/spark,nchammas/spark,pronix/spark,lvdongr/spark,xflin/spark,kissmetrics/spark,mike0sv/spark,markhamstra/spark,xflin/spark,WindCanDie/spark,michalsenkyr/spark,poffuomo/spark,nlalevee/spark,matthewfranglen/spark,ddna1021/spark,ptkool/spark,rikima/spark,mdespriee/spark,rednaxelafx/apache-spark,zero323/spark,hhbyyh/spark,jkbradley/spark,chuckchen/spark,lxsmnv/spark,liyichao/spark,spark-test/spark,poffuomo/spark,maropu/spark,icexelloss/spark,yanboliang/spark,tengpeng/spark,srowen/spark,xuanyuanking/spark,nlalevee/spark,huang1900/spark,bOOm-X/spark,mike0sv/spark,apache-spark-on-k8s/spark,aokolnychyi/spark,loneknightpy/spark,saltstar/spark,esi-mineset/spark,brad-kaiser/spark,saltstar/spark,patrick-nicholson/spark,liyichao/spark,srowen/spark,ahnqirage/spark,shaneknapp/spark,SHASHANKB/spark,WeichenXu123/spark,holdenk/spark,minixalpha/spark,gengliangwang/spark,setjet/spark,bravo-zhang/spark,patrick-nicholson/spark,sureshthalamati/spark,bdrillard/spark,ron8hu/spark,big-pegasus/spark,haowu80s/spark,rezasafi/spark,jianran/spark,szhem/spark,jiangxb1987/spark,jkbradley/spark,hvanhovell/spark,highfei2011/spark,lxsmnv/spark,rezasafi/spark,wangmiao1981/spark,1haodian/spark,cloud-fan/spark,cloud-fan/spark,apache-spark-on-k8s/spark,aosagie/spark,zhouyejoe/spark,caneGuy/spark,hvanhovell/spark,setjet/spark,metamx/spark,ptkool/spark,szhem/spark,rekhajoshm/spark,apache/spark,ahnqirage/spark,patrick-nicholson/spark,kiszk/spark,SnappyDataInc/spark,taroplus/spark,shubhamchopra/spark,metamx/spark,spark-test/spark,map222/spark,zhouyejoe/spark,dbtsai/spark,tejasapatil/spark,techaddict/spark,darionyaphet/spark,aokolnychyi/spark,adrian-ionescu/apache-spark,someorz/spark,mahak/spark,witgo/spark,saturday-shi/spark,byakuinss/spark,mdespriee/spark,bdrillard/spark,kimoonkim/spark,haowu80s/spark,spark-test/spark,nlalevee/spark,Aegeaner/spark,ptkool/spark,haowu80s/spark,techaddict/spark,MLnick/spark,aray/spark,icexelloss/spark,liyichao/spark,szhem/spark,mzl9039/spark,mdespriee/spark,Aegeaner/spark,taroplus/spark,jkbradley/spark,liutang123/spark,zzcclp/spark,WindCanDie/spark,zzcclp/spark,lvdongr/spark,caneGuy/spark,minixalpha/spark,mzl9039/spark,janewangfb/spark,wangmiao1981/spark,mike0sv/spark,akopich/spark,aokolnychyi/spark,kimoonkim/spark,jrshust/spark,mike0sv/spark,nilsgrabbert/spark,loneknightpy/spark,mdespriee/spark,highfei2011/spark,kissmetrics/spark,JoshRosen/spark,ibm-research-ireland/sparkoscope,cin/spark,adrian-ionescu/apache-spark,skonto/spark,kissmetrics/spark,kimoonkim/spark,tejasapatil/spark,eyalfa/spark,1haodian/spark,pgandhi999/spark,rekhajoshm/spark,haowu80s/spark,sachintyagi22/spark,spark-test/spark,srowen/spark,liutang123/spark,big-pegasus/spark,jianran/spark,SnappyDataInc/spark,WindCanDie/spark,sachintyagi22/spark,zzcclp/spark,kevinyu98/spark,narahari92/spark,janewangfb/spark,poffuomo/spark,MLnick/spark,Aegeaner/spark,jiangxb1987/spark,wangyum/spark,debugger87/spark,akopich/spark,zzcclp/spark,kiszk/spark,shaneknapp/spark,chuckchen/spark,pronix/spark,caneGuy/spark,jianran/spark,srowen/spark,zuotingbing/spark,zhouyejoe/spark,kevinyu98/spark,jrshust/spark,xuanyuanking/spark,zero323/spark,lxsmnv/spark,yanboliang/spark,metamx/spark,ahnqirage/spark,janewangfb/spark,guoxiaolongzte/spark,szhem/spark,hhbyyh/spark,huang1900/spark,stanzhai/spark,byakuinss/spark,pronix/spark,big-pegasus/spark,huang1900/spark,jrshust/spark,stanzhai/spark,adrian-ionescu/apache-spark,tejasapatil/spark,ConeyLiu/spark,ptkool/spark,gengliangwang/spark,ajaysaini725/spark,joseph-torres/spark,dongjoon-hyun/spark,rezasafi/spark,loneknightpy/spark,ConeyLiu/spark,yanboliang/spark,srowen/spark,jkbradley/spark,ibm-research-ireland/sparkoscope,alunarbeach/spark,poffuomo/spark,spark-test/spark,michalsenkyr/spark,rikima/spark,gengliangwang/spark,pronix/spark,shaneknapp/spark,zuotingbing/spark,xflin/spark,metamx/spark,jianran/spark,big-pegasus/spark,LantaoJin/spark,taroplus/spark,WeichenXu123/spark,wangmiao1981/spark,holdenk/spark,caneGuy/spark,alunarbeach/spark,actuaryzhang/spark,dbtsai/spark,rednaxelafx/apache-spark,shuangshuangwang/spark,UndeadBaneGitHub/spark,caneGuy/spark,taroplus/spark,narahari92/spark,apache/spark,sureshthalamati/spark,goldmedal/spark,taroplus/spark,aokolnychyi/spark,eyalfa/spark,apache/spark,minixalpha/spark,guoxiaolongzte/spark,someorz/spark,aosagie/spark,goldmedal/spark,aokolnychyi/spark,yanboliang/spark,ddna1021/spark,Aegeaner/spark,gioenn/xSpark,narahari92/spark,guoxiaolongzte/spark,LantaoJin/spark,holdenk/spark,ajaysaini725/spark,ajaysaini725/spark,saturday-shi/spark,ueshin/apache-spark,guoxiaolongzte/spark,maropu/spark,guoxiaolongzte/spark,wangmiao1981/spark,mike0sv/spark,metamx/spark,vinodkc/spark,adrian-ionescu/apache-spark,chuckchen/spark,Panos-Bletsos/spark-cost-model-optimizer,UndeadBaneGitHub/spark,brad-kaiser/spark,nilsgrabbert/spark,rezasafi/spark,lvdongr/spark,shuangshuangwang/spark,mdespriee/spark,nlalevee/spark,saturday-shi/spark,mzl9039/spark,shubhamchopra/spark,wzhfy/spark,gioenn/xSpark,SHASHANKB/spark,saltstar/spark,sureshthalamati/spark,milliman/spark,markhamstra/spark,lxsmnv/spark,kevinyu98/spark,rekhajoshm/spark,map222/spark,dongjoon-hyun/spark,gengliangwang/spark,JoshRosen/spark,tejasapatil/spark,tengpeng/spark,darionyaphet/spark,saturday-shi/spark,goldmedal/spark,michalsenkyr/spark,gengliangwang/spark,saturday-shi/spark,zero323/spark,ron8hu/spark,setjet/spark,alunarbeach/spark,jiangxb1987/spark,sureshthalamati/spark,jrshust/spark,yanboliang/spark,szhem/spark,joseph-torres/spark,narahari92/spark,lvdongr/spark,dongjoon-hyun/spark,nilsgrabbert/spark,wangyum/spark,actuaryzhang/spark,szhem/spark,debugger87/spark,shubhamchopra/spark,byakuinss/spark,icexelloss/spark,setjet/spark,lvdongr/spark,esi-mineset/spark,maropu/spark,xuanyuanking/spark,sureshthalamati/spark,aray/spark,jrshust/spark,sachintyagi22/spark,lvdongr/spark,holdenk/spark,WindCanDie/spark,xuanyuanking/spark,lvdongr/spark,cin/spark,highfei2011/spark,jlopezmalla/spark,lxsmnv/spark,huang1900/spark,publicRoman/spark,JoshRosen/spark,panfengfeng/spark,shubhamchopra/spark,ericvandenbergfb/spark,loneknightpy/spark,skonto/spark,dbtsai/spark,guoxiaolongzte/spark,kiszk/spark,bOOm-X/spark,saltstar/spark,debugger87/spark,tengpeng/spark,milliman/spark,esi-mineset/spark,vinodkc/spark,shuangshuangwang/spark,metamx/spark,UndeadBaneGitHub/spark,BryanCutler/spark,ron8hu/spark,SHASHANKB/spark,jkbradley/spark,patrick-nicholson/spark,andrewor14/spark,sachintyagi22/spark,cin/spark,spark-test/spark,zhouyejoe/spark,shuangshuangwang/spark,kimoonkim/spark,dbtsai/spark,dhruve/spark,ron8hu/spark,wangyum/spark,pgandhi999/spark,kevinyu98/spark,michalsenkyr/spark,kimoonkim/spark,wzhfy/spark,mdespriee/spark,debugger87/spark,akopich/spark,liyichao/spark,ajaysaini725/spark,byakuinss/spark,mzl9039/spark,cloud-fan/spark,poffuomo/spark,rekhajoshm/spark,janewangfb/spark,joseph-torres/spark,aray/spark,skonto/spark,map222/spark,icexelloss/spark,Panos-Bletsos/spark-cost-model-optimizer,darionyaphet/spark,bravo-zhang/spark,dongjoon-hyun/spark,someorz/spark,ericvandenbergfb/spark