dongjoon-hyun commented on a change in pull request #25778: [WIP] Make r file 
extension check case insensitive
URL: https://github.com/apache/spark/pull/25778#discussion_r323921404
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala
 ##########
 @@ -1028,7 +1028,7 @@ object SparkSubmit extends CommandLineUtils with Logging 
{
    * Return whether the given primary resource requires running R.
    */
   private[deploy] def isR(res: String): Boolean = {
-    res != null && res.endsWith(".R") || res == SPARKR_SHELL
+    res != null && (res.endsWith(".R") || res.endsWith(".r")) || res == 
SPARKR_SHELL
 
 Review comment:
   Thank you for making a PR. However, this is not the only instance, is it?
   ```
   $ git grep 'endsWith(".R")'
   core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala:    res != 
null && res.endsWith(".R") || res == SPARKR_SHELL
   
launcher/src/main/java/org/apache/spark/launcher/SparkSubmitCommandBuilder.java:
    if (!appArgs.isEmpty() && appArgs.get(0).endsWith(".R")) {
   
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala:
    if (args.primaryRFile != null && args.primaryRFile.endsWith(".R")) {
   
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala:
    if (args.primaryRFile != null && args.primaryRFile.endsWith(".R")) {
   ```
   
   cc @felixcheung and @HyukjinKwon 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to