[SQL] Python JsonRDD UTF8 Encoding Fix
[SQL] Python JsonRDD UTF8 Encoding Fix

Only encode unicode objects to UTF-8, and not strings

Author: Ahir Reddy <ahirreddy@gmail.com>

Closes #1914 from ahirreddy/json-rdd-unicode-fix1 and squashes the following commits:

ca4e9ba [Ahir Reddy] Encoding Fix

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