[SPARK-9865][SPARKR] Flaky SparkR test: test_sparkSQL.R: sample on a DataFrame
[SPARK-9865][SPARKR] Flaky SparkR test: test_sparkSQL.R: sample on a DataFrame

Make sample test less flaky by setting the seed

Tested with
```
repeat {  if (count(sample(df, FALSE, 0.1)) == 3) { break } }
```

Author: felixcheung <felixcheung_m@hotmail.com>

Closes #9549 from felixcheung/rsample.

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