[SPARK-39718][INFRA][FOLLOWUP] Remove redundant wrap in parts of the condition
[SPARK-39718][INFRA][FOLLOWUP] Remove redundant wrap in parts of the condition

### What changes were proposed in this pull request?
Remove wrap in parts of the condition to infra image job avoid always execute

### Why are the changes needed?

Infra image job should skip when it's not a pyspark job such as [link](https://github.com/zhengruifeng/spark/runs/7250331184)(a R only job, but infra image triggered), but redundant wrap in parts of the condition has influence on condition

See also:
[1] https://github.community/t/multiple-if-conditional-with-always-is-always-true/128840/3

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
CI passed: https://github.com/Yikun/spark/runs/7251008418?check_suite_focus=true

Closes #37138 from Yikun/fix_condition.

Authored-by: Yikun Jiang <2206089eaa6cfa02a44178196e5767f367cbca91@gmail.com>
Signed-off-by: Hyukjin Kwon <2680965ad5aae29275c8fb10150cb10f5554e78b@apache.org>

mahak/spark,shaneknapp/spark,hvanhovell/spark,hvanhovell/spark,wangyum/spark,srowen/spark,gengliangwang/spark,witgo/spark,zzcclp/spark,WeichenXu123/spark,zero323/spark,apache/spark,vinodkc/spark,HyukjinKwon/spark,WeichenXu123/spark,dongjoon-hyun/spark,holdenk/spark,ueshin/apache-spark,vinodkc/spark,holdenk/spark,mahak/spark,mahak/spark,witgo/spark,holdenk/spark,zzcclp/spark,vinodkc/spark,gengliangwang/spark,dongjoon-hyun/spark,wangyum/spark,dongjoon-hyun/spark,ueshin/apache-spark,shaneknapp/spark,vinodkc/spark,witgo/spark,vinodkc/spark,zero323/spark,hvanhovell/spark,mahak/spark,WeichenXu123/spark,vinodkc/spark,HyukjinKwon/spark,rednaxelafx/apache-spark,zero323/spark,shaneknapp/spark,witgo/spark,WeichenXu123/spark,apache/spark,hvanhovell/spark,ueshin/apache-spark,mahak/spark,WeichenXu123/spark,shaneknapp/spark,srowen/spark,nchammas/spark,holdenk/spark,zzcclp/spark,WeichenXu123/spark,ueshin/apache-spark,dongjoon-hyun/spark,zzcclp/spark,ueshin/apache-spark,apache/spark,zero323/spark,wangyum/spark,wangyum/spark,rednaxelafx/apache-spark,holdenk/spark,zzcclp/spark,gengliangwang/spark,srowen/spark,HyukjinKwon/spark,witgo/spark,srowen/spark,hvanhovell/spark,mahak/spark,srowen/spark,mahak/spark,zero323/spark,dongjoon-hyun/spark,nchammas/spark,HyukjinKwon/spark,shaneknapp/spark,ueshin/apache-spark,rednaxelafx/apache-spark,nchammas/spark,rednaxelafx/apache-spark,wangyum/spark,nchammas/spark,holdenk/spark,apache/spark,hvanhovell/spark,wangyum/spark,nchammas/spark,holdenk/spark,gengliangwang/spark,WeichenXu123/spark,zero323/spark,HyukjinKwon/spark,zero323/spark,wangyum/spark,rednaxelafx/apache-spark,witgo/spark,zzcclp/spark,nchammas/spark,gengliangwang/spark,HyukjinKwon/spark,HyukjinKwon/spark,apache/spark,gengliangwang/spark,apache/spark,zzcclp/spark,vinodkc/spark,nchammas/spark,gengliangwang/spark,hvanhovell/spark,srowen/spark,rednaxelafx/apache-spark,dongjoon-hyun/spark,srowen/spark,dongjoon-hyun/spark,rednaxelafx/apache-spark,shaneknapp/spark,apache/spark,ueshin/apache-spark,witgo/spark,shaneknapp/spark