[SPARK-20105][TESTS][R] Add tests for checkType and type string in structField in R
[SPARK-20105][TESTS][R] Add tests for checkType and type string in structField in R

## What changes were proposed in this pull request?

It seems `checkType` and the type string in `structField` are not being tested closely. This string format currently seems SparkR-specific (see https://github.com/apache/spark/blob/d1f6c64c4b763c05d6d79ae5497f298dc3835f3e/sql/core/src/main/scala/org/apache/spark/sql/api/r/SQLUtils.scala#L93-L131) but resembles SQL type definition.

Therefore, it seems nicer if we test positive/negative cases in R side.

## How was this patch tested?

Unit tests in `test_sparkSQL.R`.

Author: hyukjinkwon <gurwls223@gmail.com>

Closes #17439 from HyukjinKwon/r-typestring-tests.

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