[SPARK-15520][SQL] Also set sparkContext confs when using SparkSession builder in pyspark
[SPARK-15520][SQL] Also set sparkContext confs when using SparkSession builder in pyspark

## What changes were proposed in this pull request?

Also sets confs in the underlying sc when using SparkSession.builder.getOrCreate(). This is a bug-fix from a post-merge comment in https://github.com/apache/spark/pull/13289

## How was this patch tested?

Python doc-tests.

Author: Eric Liang <ekl@databricks.com>

Closes #13309 from ericl/spark-15520-1.

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