Github user qualiu commented on the issue:

    https://github.com/apache/spark/pull/14807
  
    @srowen  : Sorry that there's something misleading in my example about the 
--jar.
    #### The key points in short are :
    * The double quotes with **spark-submit.cmd** doesn't work** if the full 
path of **spark-submit.cmd** has spaces. 
     * Proven by the above example "`D:\opengit\spark\bin - Copy`"
     * The reason is there's `cmd /V /E /C ` at the line head: 
[spark-submit.cmd](https://github.com/apache/spark/blob/master/bin/spark-submit.cmd#L23):<br>
    `cmd /V /E /C "%~dp0spark-submit2.cmd" %* `
    
    * My example of the invalid jar in `--jars just-to-start` just to show that:
     * **spark-submit.cmd** could not be started if there's **one argument 
double quoted**.
    
    #### Essential problem
    * `cmd /V /E /C "~xxx.cmd"`  conflicts with/cannot accept "double quoted 
argument"
    
    ### Possible solution for discussion
    * Keep quotes & Remove `cmd /V /E /C ` just like current 
[`bin/spark-submit2.cmd`](https://github.com/apache/spark/blob/master/bin/spark-submit2.cmd#L27)
    `"%~dp0spark-class2.cmd" %CLASS% %*`
     * **Then everything will work fine.**
     * **Except possible pollution** to the environment in current cmd window 
and derived (like by `start cmd`)
    
    * Take my conservative fix
      * Everything working fine now keep working.
      * Keep not working : full Path has spaces in `XXX/bin/spark-submit.cmd`
      * Will working by this fix : argument has special character and double 
quoted will not be cut off.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to